The attached patch improves the build speed for the man pages on my
system from about 50 seconds to about 15 seconds.

It looks like the stylesheets are spending a lot of time counting the
links in the man pages so that it can put them into numbered endnotes,
but we don't have anything like that anyway, so we can save a lot of
time by turning this off.  (I suppose we'd have to turn it back on if we
have have content like that, but we've never had anything like that
before, so it doesn't seem particularly pressing.)

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
From e3fc5a79c3ec44e0b72db8ab107a611de1a6db73 Mon Sep 17 00:00:00 2001
From: Peter Eisentraut <pete...@gmx.net>
Date: Fri, 23 Feb 2018 19:52:30 -0500
Subject: [PATCH] doc: Improve man build speed

Turn off man.endnotes.are.numbered parameter, which we don't need, but
which increases performance vastly if off.  Also turn on
man.output.quietly, which also makes things a bit faster, but which is
also less useful now as a progress indicator because the build is so
fast now.
---
 doc/src/sgml/stylesheet-man.xsl | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/doc/src/sgml/stylesheet-man.xsl b/doc/src/sgml/stylesheet-man.xsl
index e9c407230c..691196525a 100644
--- a/doc/src/sgml/stylesheet-man.xsl
+++ b/doc/src/sgml/stylesheet-man.xsl
@@ -12,11 +12,13 @@
 
 <xsl:param name="man.authors.section.enabled">0</xsl:param>
 <xsl:param name="man.copyright.section.enabled">0</xsl:param>
+<xsl:param name="man.endnotes.are.numbered">0</xsl:param> <!-- for performance 
-->
 <xsl:param name="man.output.base.dir"></xsl:param>
 <xsl:param name="man.output.in.separate.dir" select="1"></xsl:param>
-<xsl:param name="refentry.meta.get.quietly" select="0"></xsl:param>
+<xsl:param name="man.output.quietly" select="1"></xsl:param>
 <xsl:param name="man.th.title.max.length">32</xsl:param> <!-- enough room for 
"CREATE TEXT SEARCH CONFIGURATION" -->
 <xsl:param name="man.th.extra3.max.length">40</xsl:param> <!-- enough room for 
"PostgreSQL X.Ydevel Documentation" -->
+<xsl:param name="refentry.meta.get.quietly" select="0"></xsl:param>
 <xsl:param name="refentry.xref.manvolnum" select="1"/> <!-- overridden from 
stylesheet-common.xsl -->
 
 <!-- Fixup for apostrophe groff output.  See the following references:
-- 
2.16.2

Reply via email to