Re: [docbook-apps] gentext.template eats 1/3 of CPU

From
Stefan Kost <>
Date
2010-03-13T04:04:53+00:00
ID
Thread
Re: [docbook-apps] gentext.template eats 1/3 of CPU
Sam Fischmann wrote:
> I, for one, would be interested in seeing a customization layer that
> implements some of your patches. Do you think you could provide a link
> some time?
>
http://git.gnome.org/browse/gtk-doc/tree/gtk-doc.xsl

check the templates from here on
http://git.gnome.org/browse/gtk-doc/tree/gtk-doc.xsl#n59

I got the major speedup from hardcoding 'en'.

Stefan

> -Sam
>
> On Fri, Mar 12, 2010 at 5:28 PM, Stefan Kost <
> <mailto:>> wrote:
>
>
>     thanks for the reply. Thanks to my profiler I could make several
>     optimizations that don't make the stylesheets worse or loose on
>     functionality. Right now I have them in my customization layer.
>     Not sure
>     if anyone would be interested in patches.
>
>     Main problem with gentext right now is also that it does not remember
>     any lookups (memoization in functional languages). Dunno if such thing
>     is doable in xslt. I could certainly see the same lookups several
>     time.
>
>     What I am now looking into is writing a xslt pre processor, that reads
>     the xsl + parameters, resolved includes + imports, kicks unused
>     templates, replaces statics and so on. Then that pre processed
>     stylesheet should be faster. Lots of work, lets see :)
>
>     Stefan
>