You are probably doing too much stuff. See if you can pre-compute stuff.  
  
For instance. Imagine you have a debate table, then you have a comment 
table that refers to the debate where the comment is made. If you want to 
show a list of debates with the comment count, then you will have to make 
an extra query for each debate to get their comment count. *OR* you can 
have a comment_counter on each debate that starts at zero and is increased 
each time a comment is created there and decreased when a comment is 
deleted (_after_insert and _before_delete callbacks are good for this). If 
you do it this way you will only need to do the first query that gets you 
the debate list.  
  
Adding cacheable=True to your selects can also speedup things a tiny tiny 
bit.

If it's still too slow then you need to cache things.  

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to