[Grok-dev] a nice research project

Martijn Faassen faassen at startifact.com
Sun Feb 8 15:45:08 EST 2009


Thanks very much Michael and Uli for looking into this stuff! Also 
thanks Chris for updating the benchmarks in your blog!

 > At least the XML parsing (with following calls to `minidom`) seems to
 > be triggered by `zope.i18n` when a locale is loaded (`getLocale()` and
 > `loadLocale()` on request of zope.publisher). This happend here only
 > on the first request. All subsequent calls (as Michaels output shows),
 > do not call TAL- or XML-stuff. Even when the server was restarted.

So you mean that this initialization is cached somehow even after a 
server restart?

 > The XML stuff looks to me like some initialization code. Also the
 > number of function calls decreases to about 300 on subsequent calls
 > (also shown in Michaels result). Should I dig deeper?

I think we should translate the things we learn from this investigations 
into steps to take. Could we make the i18n system load earlier? Would 
that have negative impact on the startup time? Why does the i18n system 
appear to need ZPT?

To go even further I think looking at the publisher is a good next step. 
I wrote more about that elsewhere on this thread, and this is also a 
good place to start the work:


In fact, Shane started some of the work already, decomposing Zope 
publisher functionality into a WSGI stack. There's now a zope.httpform 


 > A maybe interesting sidenote: when using a page template insted of
 > returning a string in the view, I get slightly faster results here.

That seems a totally bizarre result. The page template engine is doing a 
lot more work than just returning a string! Could you dig deeper into 
that one?



More information about the Grok-dev mailing list