[Erp5-report] r17606 - in /erp5/trunk/products: ERP5/ ERP5Type/ ERP5Type/Accessor/ ERP5Type...

nobody at svn.erp5.org nobody at svn.erp5.org
Thu Nov 15 11:02:10 CET 2007


Author: jp
Date: Thu Nov 15 11:02:09 2007
New Revision: 17606

URL: http://svn.erp5.org?rev=17606&view=rev
Log:
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%.

Modified:
    erp5/trunk/products/ERP5/InteractionWorkflow.py
    erp5/trunk/products/ERP5Type/Accessor/Alias.py
    erp5/trunk/products/ERP5Type/Accessor/Base.py
    erp5/trunk/products/ERP5Type/Accessor/List.py
    erp5/trunk/products/ERP5Type/Base.py
    erp5/trunk/products/ERP5Type/Utils.py
    erp5/trunk/products/ERP5Type/patches/WorkflowTool.py

[This mail would be too long, it was shortened to contain the URLs only.]

Modified: erp5/trunk/products/ERP5/InteractionWorkflow.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/InteractionWorkflow.py?rev=17606&r1=17605&r2=17606&view=diff

Modified: erp5/trunk/products/ERP5Type/Accessor/Alias.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/Accessor/Alias.py?rev=17606&r1=17605&r2=17606&view=diff

Modified: erp5/trunk/products/ERP5Type/Accessor/Base.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/Accessor/Base.py?rev=17606&r1=17605&r2=17606&view=diff

Modified: erp5/trunk/products/ERP5Type/Accessor/List.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/Accessor/List.py?rev=17606&r1=17605&r2=17606&view=diff

Modified: erp5/trunk/products/ERP5Type/Base.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/Base.py?rev=17606&r1=17605&r2=17606&view=diff

Modified: erp5/trunk/products/ERP5Type/Utils.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/Utils.py?rev=17606&r1=17605&r2=17606&view=diff

Modified: erp5/trunk/products/ERP5Type/patches/WorkflowTool.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/patches/WorkflowTool.py?rev=17606&r1=17605&r2=17606&view=diff




More information about the Erp5-report mailing list