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