[lxml-dev] Quickly dupe a parsed XSL tree
Sidnei da Silva
sidnei at enfoldsystems.com
Tue Mar 25 01:55:47 CET 2008
I have one application using lxml which runs as a Apache output filter.
This app fetches a XSL file which in turn includes/imports several
other XSL files over the network. Doing so is reasonably expensive,
but needs to happen once and only once, since I keep a cached copy of
the parsed XSL file in memory per thread.
The problem is though that there can be a *lot* of threads in a
typical Apache setup, and until the application has 'warmed up', each
client that first hits a thread pays the price of fetching and parsing
this XSL.
I am looking for a way to, as soon as at least one thread has done the
work and has the XSL object in memory, have the other threads just
clone/dupe the existing in-memory XSL object instead of doing all this
useless computation all over again.
Does such a thing exist already?
--
Sidnei da Silva
Enfold Systems http://enfoldsystems.com
Fax +1 832 201 8856 Office +1 713 942 2377 Ext 214
More information about the lxml-dev
mailing list