David Turner wrote: > On Wed, 2009-07-22 at 16:16 -0400, David Turner wrote: > >> On Wed, 2009-07-22 at 15:03 -0400, Stef Telford wrote: >> >>> Oleg Broytmann wrote: >>> >>>> On Wed, Jul 22, 2009 at 02:26:57PM -0400, Stef Telford wrote: >>>> >>>> >>>>>>> yes. evals appear to be a 'bad' thing here :\ >>>>>>> >>>>>>> >>>>>> Well, those evals are in sqlmeta.addColumn and .addJoin methods, so >>>>>> they >>>>>> work once for every column in the table, but that's all. After the class >>>>>> has been created and populated - whatever you do with rows (class >>>>>> instances) >>>>>> - those evals are not executed. >>>>>> >>>>>> >>>>>> >>>>> Ah. hrm. *rubs chin* perhaps it's not the evals then. It seems that the >>>>> instantiations get .. well .. 'slower' over time. >>>>> >>>>> >>>> Curiouser and curiouser. IWBN to find where the slowness is *near the >>>> end* of the loop - i.e. when instantiation becomes really slow. >>>> >>>> >>>> >>> It could be purely a 'feeling' .. I don't have any numbers to back it up >>> and I am not entirely sure -how- to benchmark that. This machine does >>> have 8gb of ram in it, and a fairly beefy quad core. I have never seen >>> any process get near memory exhaustion, which I could believe the calls >>> to 'malloc' could slow down but.. yes. >>> >> Python's GC takes time roughly proportional to the number of live >> objects. The GC is called every 700 allocations (7000, 70000 for older >> generations), so allocation also takes time proportional to number of >> live objects. >> > > http://www.gossamer-threads.com/lists/python/dev/658396?page=last <-- > see this thread, for instance. > >
Hrm.. that would definitely explain and contribute to the slow down after a lot of objects on the page (>100k). I haven't seen anyway around the GC in python though, other than the folks at unladen-swallow trying to re-implement with a 'better' GC. Hrm, I wonder if IronPython could run webware+sqlobject .. hrm. Regards Stef ------------------------------------------------------------------------------ _______________________________________________ sqlobject-discuss mailing list sqlobject-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss