are you using auth.signature in any table?
if you have Auth, the auth tables will not be lazy (I think) because it
needs to be defined on auth.define_tables()


On Sat, Aug 18, 2012 at 6:58 AM, David Marko <dma...@tiscali.cz> wrote:

> I have redesigned one of my app by moving requires into Field definition,
>  and setup the lazy_tables=True ... and benchmarked difference(before and
> after trunk version) using apache benchmark but cant see any difference for
> home page which dont require any table ... so I expect speedup here. Both
> AB gives me cca. 32req/sec
>
> David
>
> Dne sobota, 18. srpna 2012 5:00:44 UTC+2 Massimo Di Pierro napsal(a):
>
>> There are two major speed improvements in trunk and I am not sure whether
>> they should go in web2py 2.0 next week.
>>
>> 1) Lazy table (based on ideas from Bruno).
>>
>> db = DAL(...., lazy_tables=True)
>> db.define_table('person',**Field('name'))
>>
>> the table is instantiated only when db.person is accessed.
>> So with some care:
>>
>>   Field(...., requires=....) # LAZY (good)
>>   db.table.field.requires = ... # NOT LAZY (bad)
>>
>>   Field('other','reference table') # LAZY (good)
>>   Field('other',db.table) # NOT LAZY (bad)
>>
>> this may be a big speedup.
>>
>>
>> 2) There is a new implementation of class Storage. This is a most
>> accessed object within web2py and now it is 10x faster.
>> Yet I am not sure if this breaks something.
>>
>>
>> It would be great if you could try the nightly build (or trunk) and
>> report if you experienced any problem.
>> It would be even better if you could run some benchmarks of your code
>> before and after the changes suggested at 1).
>>
>> Massimo
>>
>>
>>
>>
>>
>>  --
>
>
>
>

-- 



Reply via email to