• Jean-Paul Smets's avatar
    This megapatch changes the way accessors are generated. Instead of generating... · 8d4c2a58
    Jean-Paul Smets authored
    This megapatch changes the way accessors are generated. Instead of generating all accessors for each portal type, we only generate tuples which are put in a kind of tuple cache. The idea is to minimise the number of objects which are created and use objects which are as small as possible. Then, the next time aq_dynamic is invoked, we dynamically create a new accessor instance based on the parameters provided in the tuple. This way, it is possible to reduce the memory footprint of ERP5 by 200 MB at least and create only those accessors which are needed. 
    In addition, accessors are now generated per portal_type and per class. This way, if the class of a portal type changes in a system, different accessors are generated and there is no risk of falling into a problem of "first argument of method XXX must be of type YYY".
    The downside is currently a possible speed decrease of 2-3%.
    
    git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@17606 20353a03-c40f-0410-a6d1-a30d3c3de9de
    8d4c2a58
InteractionWorkflow.py 11.8 KB