On 27 January 2012 20:24, Bruno Rocha <[email protected]> wrote:

> I also noted  best performance directly rendering the templates and
> caching views where it can be cached.
>
> just replacing
>
> return dict()
>
> with
>
> return response.render(filename, context)
>
Is there documentation about this?  How do you code the view differently in
such a case?

> the bottleneck is always server and database, so it is better to use pure
> Python to sort, find, filter Rows objects than using a lot of database
> requests.
>
> DAL provides .sort .find .exclude and Python has a lot of good things like
> map, reduce, filter. With one db request you can fetch records put them in
> cache and use Python in some cases to avoid more sql queries. Even
> paginations can be done without the need to go to db again.
>

This might be true for smaller queries, but when working with thousands of
records Postgresql is much more efficient than Python.

Regards
Johann
-- 
Because experiencing your loyal love is better than life itself,
my lips will praise you.  (Psalm 63:3)

Reply via email to