[ZPT] Tempalte "program" not persistent
Evan Simpson
evan@zope.com
Mon, 17 Sep 2001 22:10:30 -0400
Richard Jones wrote:
> We're having problems with the non-persistence of the page template programs.
> The first being that it takes a while to cook the templates, and that has to
> be done every time the server is restarted. The second is that we see strange
> problems with the program only being updated in some threads (we think).
The first is expected, the second isn't. If you could pin that behavior
down reproducibly, I'd appreciate it.
> I haven't really had much chance to think about it - so are there any obvious
> reasons why the program can't be made persistent?
None whatsoever. There's a storage space cost, of course, for the time
savings. The compiled program is somewhat larger than the original
text. I really wish we could create a compact "parser hints" data
structure that allowed fast re-parsing, but I don't know enough to do
it, and it might not be possible without getting into the parsers' guts.
Meanwhile, there should probably be some way of indicating that you want
the program for some or all templates to be saved, so that people can
pick their tradeoff.
Cheers,
Evan @ Zope