Re: [xml-bindings]Memoization
- From: Daniel Veillard <veillard redhat com>
- To: xml-bindings gnome org
- Subject: Re: [xml-bindings]Memoization
- Date: Thu, 22 Aug 2002 10:57:23 -0400
On Thu, Aug 22, 2002 at 03:51:28PM +0100, Gary Benson wrote:
> On Thu, Aug 22, 2002 at 08:13:21AM -0400, Daniel Veillard wrote:
>
> > Hum, there is no such mechanism, the only way would be to add an
> > interface to libxslt to plug-in a document cache. Note that for a single
> > transformation all the document() result are cached (this is actually
> > required by the XSLT spec), but there is no mechanism for a more global
> > cache. Could make sense, could be very small change if one doesn't
> > try to implement a default cache in libxslt itself.
>
> I'm not trying to cache the results of transformations: each one only
it's not what I suggested :-)
I suggested to cache the documents loaded by document() at runtime
application wide.
> happens once in my application anyway so caching would not help. The
> problem I have is that I wrote the thing to be really easy to develop
> for first and foremost, and threw everything else out of the window.
>
> The app in question is used to generate static HTML for inauspicious.org
> and the problem is mainly that each of the 250-odd diary entries
> requires seven files to be parsed: the huge (~350k) file containing all
> the diary entries, the XSLT file that converts one day's worth of
> entries into i.o markup and the XSLT file that converts i.o markup to
> HTML. The second XSLT file includes three more files, one of which
> parses the file full of diary entries again to create the calendar. I
> could speed it up by rearranging it all with speed as a priority but
> that would be a lot of work and if I can simply cache documents that
> come from xmlParseFile() then that would work a treat.
>
> Any ideas on where to start?
Do it as a single XSLT transform using chunking to split out the various
HTML files, within a single transormation all the document used as input
are cached in their preparsed form, i.e. all XML documents used will be
parsed only once.
Daniel
--
Daniel Veillard | Red Hat Network https://rhn.redhat.com/
veillard redhat com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]