On Friday 29 May 2009, Mark Ramm wrote:
> One of the most problematic parts of Genshi performance wise is match
> tags, since they are each compared to every tag in the stream as they
> go by, so you may be able to get some good performance improvements by
> using py:def template functions rather than match tags in various
> places.

Got a lot of py:match things in there. I'll look into those. Thanks for the 
tip.

> And you may gain some huge performance increases on large pages by
> using Mako or Jinja instead of genshi.   I'd try it with one page to
> see how it changed things.

Actually the pages aren't that large. It's just a ton of components that make 
it up (say:  conditional <xi:include> statements)

> SQLAlchemy query performance is harder to provide optimization
> suggestions for, but I'm sure that we'll be willing to help out on the
> list if you distill some data for us. You might be able to make fewer
> queries by turning on eager loading of some data, and you might be
> able to add some indexes to speed up slow performing queries.

Actually I'm using a tons of views to move assembling of datasets into the 
database. That's why I was ranting about table reflection, since I use 
reflection to provide a SA mapper to views.

> If you have big query result sets that can be cached, you can use
> Beaker's cache system even with tg 1.x, and caching may help you a
> lot.

That's the issue with my type of website: the datasets are actually small most 
of the time. I'd say at least half of the datasets are one record only. Just 
in pages like the forum or blogs there's larger datasets. I haven't checked 
yet, but I think I could improve on the paginate decorator to only select 
what's needed and not take the whole set and filter the 10 records displayed 
in python (don't know if paginate does that currently or not, so I'd have to 
check the code and see)

Uwe

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to