Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eIViS-0005eo-Dg for pgsql-docs@arkaria.postgresql.org; Sat, 25 Nov 2017 08:21:36 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eIViR-0004jY-Ra for pgsql-docs@arkaria.postgresql.org; Sat, 25 Nov 2017 08:21:35 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1eIViR-0004jO-H6 for pgsql-docs@lists.postgresql.org; Sat, 25 Nov 2017 08:21:35 +0000 Received: from mail-lf0-x22c.google.com ([2a00:1450:4010:c07::22c]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1eIViJ-0007Kc-5l for pgsql-docs@postgresql.org; Sat, 25 Nov 2017 08:21:34 +0000 Received: by mail-lf0-x22c.google.com with SMTP id d10so16537547lfj.7 for ; Sat, 25 Nov 2017 00:21:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language; bh=H1/zAaj3Z8YSlLt+oqJ1hSEeLa8wOq5dEu9R2toxTRo=; b=ozWqyDN6dNt2JL60satHUcrzWQrNdzRX4XBqOb8wRPFXmUwoB9IpeH74n3wXIZOjmK ANlU/pWN2qgrlEmTrMNO4p30RpGd7sB3fRyZsPKZgzFnhX8RJAk4HbmfvJSFU6MsazbI i8X6clc+AbvjlSCRX3DBC5JJgPfyLTiMV1SNMjDji233tle13wfdjl1eXr/JRPMl7byI gs19AXIUaq4zB8AxXDNMKgfIST4lSlBddyaOHIkrEJ9rDWg6GskFqhgwGvPbBpFcYHRF WMLIyK3hiCp4LpHh++a2zQ047a5CeqbrrHaFcK8unuwNTk2azl91Te0NF+DvqFmtKa0s xuWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=H1/zAaj3Z8YSlLt+oqJ1hSEeLa8wOq5dEu9R2toxTRo=; b=jUmirMD+TgKz8AIenhiMUwqkeIPJ1nbAR7026IPkAQeIXv2vDmv41xVfQYFX84/ym1 oNEsPIOYxV49EIg8cOSL7j32jFGf9Hl8sfaDuY2bNwD/lWPGu4VvzOY4wubZL/whuWbv mechPIoXk/d9E1WPftS6TB/Ifcktst1fvs26gz2H/RZiKpGem/CNljCz4SpdFAzPSIkU 02mFLSBpxpHh8NzomOo5dl24sc27tHNYJYJPXwb4x2pksoFSwqD2ADa03z2SDDbQevTG IItzUC3NgIVBNt5H1mY0PayXdO7fzcTtSMeGmGUYOy7KR2mRgPclNUs0HFSgXwZCEd20 aP7w== X-Gm-Message-State: AJaThX5H6JmcFVvtEvXzxnrmeiLhi6xFSERJ/chzLIxv/u1/J64ROteA 6C28U6LCzdKJGR3RSkXmzvQzAQ== X-Google-Smtp-Source: AGs4zMZFX8d4UD4T0GrBZXHr5u5fMqlveaCTr0+rptXTarIBUC73la55w6DNcYmsPY3pE9ZswnjgyQ== X-Received: by 10.46.2.17 with SMTP id 17mr13139946ljc.67.1511598085008; Sat, 25 Nov 2017 00:21:25 -0800 (PST) Received: from [1.0.0.7] ([178.155.4.142]) by smtp.gmail.com with ESMTPSA id o28sm4018254lfc.50.2017.11.25.00.21.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 25 Nov 2017 00:21:24 -0800 (PST) Subject: Re: MacPorts xsltproc is very slow? To: Thomas Munro Cc: pgsql-docs@postgresql.org References: <6c7f286d-8803-3884-0638-10f513498464@gmail.com> From: Alexander Lakhin Message-ID: <5fab84ca-f57b-5f2c-0a6c-3e8c6ed938ff@gmail.com> Date: Sat, 25 Nov 2017 11:21:23 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/alternative; boundary="------------1503E21F605FB21FA1E73404" Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk This is a multi-part message in MIME format. --------------1503E21F605FB21FA1E73404 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit 25.11.2017 11:03, Thomas Munro wrote: > > Hmm. Well, this is all new to me but I'd have expected the numbers in > the "Calls" column to be entirely deterministic. I think, calls are depending on the XSL templates and it seems we have different templates. (I couldn't find 'd:appendix' in my docbook-xsl installation, that's why I asked about version number.) Maybe it's another case then, your version is new. Now I see 'd:appendix' appeared in https://github.com/docbook/xslt10-stylesheets/blob/master/xsl/html/chunktoc.xsl > Perhaps that > business about conditional use of UnwrapLinks and other things like it > change the numbers. It's interesting that "gentext.template" is in > the same ballpark on our two systems in terms of calls and CPU time, > but the top templates are massive outliers on my system. I have no > idea what I'm even looking at really but I couldn't help noticing that > templates with match="chapter" and match="appendix" appear in our tree > in sgml/stylesheet-speedup-common.xsl with a comment > "Performance-optimized versions of some upstream templates from > common/ directory". Could it be that whatever performance-enhancing > trick they perform doesn't work on 1.1.32, or alternatively they are > not being reached so we're falling back to non-optimised versions > instead of these? > >> I wonder, what version of docbook-xsl are you using? >> (I have 1.79.1+dfsg-1). >> Can you check with 1.79+ (if yours is older)? > docbook-xsl version 1.79.2_1. I'll try to install 1.79.2 version and check the performance on my side. ------ Alexander Lakhin Postgres Professional: http://www.postgrespro.com The Russian Postgres Company --------------1503E21F605FB21FA1E73404 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 7bit

25.11.2017 11:03, Thomas Munro wrote:

Hmm.  Well, this is all new to me but I'd have expected the numbers in
the "Calls" column to be entirely deterministic.
I think, calls are depending on the XSL templates and it seems we have different templates.
(I couldn't find 'd:appendix' in my docbook-xsl installation, that's why I asked about version number.)
Maybe it's another case then, your version is new.
Now I see 'd:appendix' appeared in
https://github.com/docbook/xslt10-stylesheets/blob/master/xsl/html/chunktoc.xsl

  Perhaps that
business about conditional use of UnwrapLinks and other things like it
change the numbers.  It's interesting that "gentext.template" is in
the same ballpark on our two systems in terms of calls and CPU time,
but the top templates are massive outliers on my system.  I have no
idea what I'm even looking at really but I couldn't help noticing that
templates with match="chapter" and match="appendix" appear in our tree
in sgml/stylesheet-speedup-common.xsl with a comment
"Performance-optimized versions of some upstream templates from
common/ directory".  Could it be that whatever performance-enhancing
trick they perform doesn't work on 1.1.32, or alternatively they are
not being reached so we're falling back to non-optimised versions
instead of these?

I wonder, what version of docbook-xsl are you using?
(I have 1.79.1+dfsg-1).
Can you check with 1.79+ (if yours is older)?
docbook-xsl version 1.79.2_1.
I'll try to install 1.79.2 version and check the performance on my side.

------
Alexander Lakhin
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
--------------1503E21F605FB21FA1E73404--