On Fri, Apr 9, 2010 at 7:05 PM, Malthe Borch <mbo...@gmail.com> wrote:
> I think it would be worth it to go through the generated code for
> Plone to see if it looks optimal, or if there are obvious problems
> such as the one you've pointed out. Rinse and repeat for every major
> change, perhaps.

Well, the current generated code has deteriorated quite a bit with
features being added over time ;)

Last time I looked there were a number of obvious inefficiencies:

- Some page template classes always have certain variables in their
expression context. Like context, view, root or the like. Currently
there's a lot of additional attribute accesses to get these from the
general expression context.

- The utf-8 / Unicode mixed mode generates lots of additional code.
Only allowing Unicode or objects that have an Unicode representation
would simplify the code. The __html__ feature could be optional as

- Generally there's no real optimizations in the code and the current
infrastructure makes them hard to write. Like generating efficient
code for stuff like "var1 string:'static'". Or not filling the repeat
variable if it isn't used inside a repeat block. Maybe I should try
again harder, but I failed at both of these the last times I tried ;)

Repoze-dev mailing list

Reply via email to