Oleg Broytmann wrote:
> On Fri, May 22, 2009 at 12:52:52PM -0400, Stef Telford wrote:
>   
>> I am merely wondering where things 'slow 
>> down' so much and if there is anything we can do about it :(
>>     
>
>    Can you run your test program under the python profiler and find out the
> slow spot(s)?
>
> Oleg.
>   
Hello Oleg, Everyone,
    Sorry for the delay in replying.. "real life" sort of got in the 
way. Deepest apologies for that.

    When I benchmarked the SQLObject page of 7000+ objects (give or take 
a few hundred), I got the 80-90 seconds. With plain python objects, I 
got the 0.3 seconds (obviously a lot less going on, so, not surprising 
there). However, when I took out the evals inside sqlobject/main.py, I 
got the page speed to around 15-20 seconds.

    So, this raises the question, is it perhaps better to -not- use 
eval(..) and instead tinker with the objects __attributes__ or __dict__ 
? I am not -that- conversant/knowledgeable in pythons black magic of 
object meta programming but.. I definitely think that if we can get away 
from calling 'evals' when doing object instantiation that would be a 
HUGE performance win.

    And, in the process of putting my money where my mouth is, I am more 
than willing to donate $200 bounty for the fix, either to the person or 
charity of their choosing.

    Seriously :)
   
    Regards and thanks
    Stef
(ps. I -do- have a large PNG of the system during a single 'page 
impression'. It's about 7mb .. I can send it offlist if your interested ?)

------------------------------------------------------------------------------
_______________________________________________
sqlobject-discuss mailing list
sqlobject-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss

Reply via email to