Re: [Boost-docs] Docbook to html optimizations

Subject: Re: [Boost-docs] Docbook to html optimizations
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2010-03-22 21:00:09


Eric Niebler wrote:
> Awesome. No comments other than (a) it would be great if you could
> document for us XSLT newbies what you're doing to make it fast (e.g.,
> do this, don't do that), and (b) keep up the good work!

Here's a summary of what I've done so far. Several of
the biggest optimizations are not XSLT specific. The
code was pretty awful in some places.

* Rewrite the syntax highlighter in a more sane way.
* Avoid repeated lookup of parent scopes in fully-qualified-id.
* Rewrite cxx-link-name in a more sane way.
* Hard-code the language to en, since the
  template for computing it is quite slow.
* Use an xsl:key in gentext.template.
* Inline gentext.template.exists and gentext.template
  into html.title.attribute and eliminate common
* Put //license last when it's tested in html.head,
  so that it will be short-circuited out. A better
  solution would be to save it in a variable, so that
  it never gets recomputed.
* Use chunkfast.xsl instead of chunk.xsl
* If you want to know whether two nodes are the
  same, use generate-id($node1) = generate-id($node2)
  instead of $node1 = $node2. The latter probably
  doesn't do what you want and can be slow.

In Christ,
Steven Watanabe

This archive was generated by hypermail 2.1.7 : 2017-11-11 08:50:41 UTC