Mariano, if you are saying that importing anything and using "current" object inside the modules that we are importing is a problem, so I guess we really have a big problem!
Many small apps can rely on some basic model execution system, but even if cached it would be still "strange" to have all of them loaded in cache. One of the most brilhant features of Python and any other modern language is the "namespaces" feature. So I can't imagine a big app without relying on namespaces, modules, packages, classes etc.. Thats the best way for programming in Python, and IMO: also thats the best way for programming in web2py. If threading.locals() has a problem,I think the goal should be to solve that problem, not to cache the models or to create routing hacks. (* I think map models is a good idea, but it is not a solution) Do you have any further information about that issue? On Tue, Mar 13, 2012 at 4:06 PM, Mariano Reingart <reing...@gmail.com>wrote: > WARNING with import and threading.local(): they were hot topics on the > pycon webdev summit, and other frameworks are facing problems with > them. > > They could be memory hungry and contention problems could arise, so > they could have scalabillity issues too. > > I think the web2py way is not so bad, but we should find some way to > cache the models. > > Best regards, > > Mariano Reingart > http://www.sistemasagiles.com.ar > http://reingart.blogspot.com > -- Bruno Rocha [http://rochacbruno.com.br]