[Erp5-dev] programmable acquisition and performance

Jean-Paul Smets jp at nexedi.com
Thu Feb 7 10:02:02 CET 2008


Hi,

I think bartek is discussing another issue: the acquisition of values
through categories.

    - convenient: yes
    - heavy: potentially, yes
    - optimisable: not sure

This is why we use it when it is the clean way to do and we try not to
use it when it is not necessary.

There are already optimisations (with read only transaction caches).

I am not sure if it is possible to optimise it so much because part of
the performance cost is related to the access time to many ZODB objects
rather than a few. The first kind of optimisation to do is to try to
call the accessor once in a transaction rather than 10 times.

Regards,

JPS.




Pelletier Vincent a écrit :
> Le Mercredi 6 Février 2008 17:12, bartek a écrit :
>   
>> Hello
>>     
>
> Hi Bartek
>
>   
>> I noticed a considerable
>> decrease in performance, but I'm not sure whether this is the reason -
>> is programmable acquisition so heavy? And if so, then why, and can it be
>> optimized somehow?
>>     
>
> As noted in the [1] wiki page ("Is there any side effect by the patch?" 
> section), _aq_dynamic is called every time __getattr__ returns None.
> So every time a skin lookup is done (form, page template, script, etc) the 
> custom acquisition method will be fired, for example.
> I think the first optimisation to do is to have a quick check at _aq_dynamic 
> begining to detect cases where it will return None, and do so immediately.
>
> [1] http://www.erp5.org/WhyAqDynamicIsRequired
>
>   


-- 
Jean-Paul Smets-Solanes, Nexedi CEO - Tel. +33(0)6 62 05 76 14
ERP5 Enterprise: Free / Open Source ERP for Critical Applications
http://www.erp5.com
ERP5 Express: Hosted Open Source ERP for small companies
http://www.myerp5.com
Nexedi: Consulting and Development of Free / Open Source Software 
http://www.nexedi.com




More information about the Erp5-dev mailing list