pgsql: doc: Speed up XSLT builds - Mailing list pgsql-committers

From Peter Eisentraut
Subject pgsql: doc: Speed up XSLT builds
Date
Msg-id E1baRXX-0000KJ-C7@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
doc: Speed up XSLT builds

The upstream XSLT stylesheets use some very general XPath expressions in
some places that end up being very slow.  We can optimize them with
knowledge about the DocBook document structure and our particular use
thereof.  For example, when counting preceding chapters to get a number
for the current chapter, we only need to count preceding sibling
nodes (more or less) instead of searching through the entire node tree
for chapter elements.

This change attacks the slowest pieces as identified by xsltproc
--profile.  This makes the HTML build roughly 10 times faster, resulting
in the new total build time being about the same as the old DSSSL-based
build.  Some of the non-HTML build targets (especially FO) will also
benefit a bit, but they have not been specifically analyzed.

With this, also remove the pg.fast parameter, which was previously a
hack to get the build to a manageable speed.

Alexander Lakhin <a.lakhin@postgrespro.ru>, with some additional
tweaking by me

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/e8306745e3504c642f7abad411139d5630e29fac

Modified Files
--------------
doc/src/sgml/stylesheet-common.xsl         |   8 +-
doc/src/sgml/stylesheet-speedup-common.xsl |  94 +++++++++++
doc/src/sgml/stylesheet-speedup-xhtml.xsl  | 252 +++++++++++++++++++++++++++++
doc/src/sgml/stylesheet.xsl                |   1 +
4 files changed, 350 insertions(+), 5 deletions(-)


pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: pgsql: Improve psql's tab completion for \l.
Next
From: Tom Lane
Date:
Subject: pgsql: In plpgsql, don't try to convert int2vector or oidvector to expa