There are many things you can do for efficiency and scalability that are 
not specific to web2py. I'll leave you to research those topics, but here 
are some items specific to web2py (many of these are mentioned in the 
"Efficiency Tricks" section of the Deployment 
Recipes<http://web2py.com/books/default/chapter/29/13>chapter of the book):

   - Bytecode compile the app (using admin).
   - Turn off migrations.
   - Cache as much as possible, including queries.
   - Minimize model execution by (1) turning on lazy_tables, (2) using 
   conditional models (possible new models router coming soon to make this 
   even more flexible), and (3) possibly moving some/all model code to modules 
   and importing only when needed.
   - Split up large controller files into multiple controllers.
   - For requests that don't need the session, do session.forget(response)(this 
will unlock the session file so other concurrent requests from the 
   same user such as Ajax calls will not get blocked). Note, passing the 
   response object is necessary for the unlocking.
   - For uploads that don't need to be protected via login/permissions, 
   upload to the static folder and serve as static files instead of via the 
   standard response.download() function.
   - Let the web server serve static files instead of web2py (and maybe 
   move some to a CDN).
   - If you don't need the .update_record() and .delete_record() methods in 
   your Rows object, do .select(..., cacheable=True) to speed up the 
   parsing.
   - For queries returning large results sets, if you don't need all the 
   features of the DAL Rows object and just want the raw data returned by the 
   db driver, specify your own faster custom processor via .select(..., 
   processor=[your custom processor]).
   
Anthony

On Saturday, September 1, 2012 6:15:05 PM UTC-4, Webtechie wrote:
>
> 1. Apart from building tables so that joins are minimum and building 
> indexes .. what are other optimisations to make that possible ? 
> 2 . I understand that some tuning should be done . could you be more 
> specific about the type of tuning that should be done ? what should be 
> changed exactly ? can you please explain with a specific use case ? 
>
> On Saturday, September 1, 2012 10:18:01 PM UTC+5:30, Webtechie wrote:
>>
>>
>> I would like to use web2py for a web application which has large 
>> databases (really large) , expects high volume of traffic . Are there any 
>> ways to make web2py apps run faster ? (like really faster ) , (looking for 
>> solutions apart from pooling more hardware and replacing Cpython wth pypy , 
>> running on a non-blocking server like tornado ) . How can i optimise web2py 
>> for my needs ? are web2py applications scalable ?
>>
>

-- 



Reply via email to