At this time we do not yet have a way to switch off models. What you can do is move the controller that does not need dal to another app that does define models and share their sessions (if you need sessions). I agree we need a better solution.
On Apr 6, 8:40 am, Jay <[email protected]> wrote: > Thanks Jonathan and Massimo. This makes web2py EVEN more attractive > for high end apps. > > I have one further request: > > A little history, I use web2py for all heavier lifting (forms and db > processing etc.) but use Tornado for serving pages (seehttp://fon.st > ) with links and redirecting links. I want to turn off DAL for some > actions like the ones above. The model exists and it is being used for > the 'heavy lifting', but for serving links and redirecting I am going > through the cache and the loading happens if the request misses in the > cache. If I could switch off DAL for either some actions OR some > controller(s), I could replace the actions served by Tornado > completely with web2py. Under Tornado I can currently serve about 850 > URL re-directions per second (checked on the local server) if they are > in cache, a lot slower if reading from db. Tornado is running behing > Nginx. > > So, to translatehttp://host/CVGFsdf87tohttp://google.com(assuming > data in cache), what is the fastest way to do it using web2py? > > Regards, > > Jay > > On Mar 16, 1:57 pm, Massimo Di Pierro <[email protected]> > wrote: > > > > > > > > > You should also thank Jonathan, we have been working together on this. > > > Massimo > > > On Mar 16, 11:40 am, Ross Peoples <[email protected]> wrote: > > > > Ok, here are the results from testing the welcome app: > > > > BEFORE TRUNK UPDATE > > > ========================================= > > > Time taken for tests: 91.843 seconds > > > Requests per second: 10.89 > > > Time per request: 91.843 ms > > > > BEFORE TRUNK UPDATE WITH MIGRATE=FALSE AND BYTECODE COMPILED > > > ========================================= > > > Time taken for tests: 63.323 seconds > > > Requests per second: 14.85 > > > Time per request: 67.323 ms > > > > AFTER TRUNK UPDATE > > > ========================================= > > > Time taken for tests: 47.295 seconds > > > Requests per second: 21.14 > > > Time per request: 47.295 ms > > > > AFTER TRUNK UPDATE WITH MIGRATE=FALSE AND BYTECODE COMPILED > > > ========================================= > > > Time taken for tests: 29.588 seconds > > > Requests per second: 33.80 > > > Time per request: 29.588 ms > > > > As you can see, the improvements you made make a huge difference. I tested > > > my own app as well, and that runs about 25% faster. Of course my app is > > > not > > > bytecompiled, and all of my tables are set to migrate=True since it is > > > still > > > being developed. Overall, I'd say this was a great addition to web2py. > > > Great > > > job Massimo!

