From PLuzanov@postgrespro.ru Sun May 24 04:56:37 2026 Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YdmVY-00071g-N1 for pgsql-docs@arkaria.postgresql.org; Thu, 02 Apr 2015 21:18:36 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YdmVY-00028A-37 for pgsql-docs@arkaria.postgresql.org; Thu, 02 Apr 2015 21:18:36 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YdmVW-000283-VO for pgsql-docs@postgresql.org; Thu, 02 Apr 2015 21:18:35 +0000 Received: from mailgw.zannimox.com ([81.211.2.140] helo=zannimox.com) by makus.postgresql.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1YdmVO-0001EE-I3 for pgsql-docs@postgresql.org; Thu, 02 Apr 2015 21:18:33 +0000 Received: from Internal Mail-Server by mailgw.zannimox.com (envelope-from PLuzanov@postgrespro.ru) with ESMTPS (AES256-SHA encrypted); 3 Apr 2015 01:23:01 +0400 Received: from exch-01.zannimox.com (172.16.0.252) by exch-01.zannimox.com (172.16.0.252) with Microsoft SMTP Server (TLS) id 15.0.1044.25; Fri, 3 Apr 2015 00:23:00 +0300 Received: from exch-01.zannimox.com ([::1]) by exch-01.zannimox.com ([::1]) with mapi id 15.00.1044.021; Fri, 3 Apr 2015 00:23:00 +0300 From: Luzanov Pavel To: "peter_e@gmx.net" CC: "pgsql-docs@postgresql.org" Subject: Moving documentation to XML Thread-Topic: Moving documentation to XML Thread-Index: AQHQbYdJWhl7WyX5xEyMHrVlMv0DJw== Date: Thu, 2 Apr 2015 21:22:59 +0000 Message-ID: <1428009501118.85114@postgrespro.ru> Accept-Language: ru-RU, en-US Content-Language: ru-RU X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [77.232.15.212] Content-Type: multipart/alternative; boundary="_000_142800950111885114postgresproru_" MIME-Version: 1.0 X-Pg-Spam-Score: -0.5 (/) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-docs Precedence: bulk Sender: pgsql-docs-owner@postgresql.org --_000_142800950111885114postgresproru_ Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: quoted-printable Peter, I found this message in archives: http://www.postgresql.org/message-id/flat/519C3D99.9000304@gmx.net#519C3D99= .9000304@gmx.net and, as you recommend, tested a speed of building docs on a fresh Ubuntu in= stallation. 50sec for make html and 14min 50sec for make xslthtml 17 times slower! Is it still a main stopper for moving to XML? ----- Pavel Luzanov pluzanov@postgresql.ru --_000_142800950111885114postgresproru_ Content-Type: text/html; charset="koi8-r" Content-Transfer-Encoding: quoted-printable

Peter,


I found this message in archives: 

http://www.postgresql.org/message-id/flat/5= 19C3D99.9000304@gmx.net#519C3D99.9000304@gmx.net


and, as you recommend,&nb= sp;tested a speed of building docs on a fresh Ubuntu install= ation.

50sec for make html
and 14min 50sec for make = xslthtml
17 times slower!


Is it still a main stopper for moving to XML?


-----

Pavel Luzanov
pluzanov@postgresql.ru

--_000_142800950111885114postgresproru_-- From peter_e@gmx.net Sun May 24 04:56:37 2026 Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YfDEF-0006V1-1q for pgsql-docs@arkaria.postgresql.org; Mon, 06 Apr 2015 20:02:39 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YfDEE-0001GU-HI for pgsql-docs@arkaria.postgresql.org; Mon, 06 Apr 2015 20:02:38 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YfDED-0001GO-Ss for pgsql-docs@postgresql.org; Mon, 06 Apr 2015 20:02:38 +0000 Received: from mout.gmx.net ([212.227.17.22]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YfDEA-0001IS-DQ for pgsql-docs@postgresql.org; Mon, 06 Apr 2015 20:02:36 +0000 Received: from auth1-smtp.messagingengine.com ([66.111.4.227]) by mail.gmx.com (mrgmx102) with ESMTPSA (Nemesis) id 0MIhDo-1YhQ9I0m9Q-002HHI for ; Mon, 06 Apr 2015 22:02:32 +0200 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailauth.nyi.internal (Postfix) with ESMTP id C19792097D for ; Mon, 6 Apr 2015 16:02:26 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute1.internal (MEProxy); Mon, 06 Apr 2015 16:02:30 -0400 X-Sasl-enc: o/0Z1QDFRY/cY10A+SSruV1oXFqEziMxPnUEycUnmh4l 1428350550 Received: from [192.168.1.117] (unknown [204.145.120.11]) by mail.messagingengine.com (Postfix) with ESMTPA id 5B52CC00013; Mon, 6 Apr 2015 16:02:30 -0400 (EDT) Message-ID: <5522E656.4060201@gmx.net> Date: Mon, 06 Apr 2015 16:02:30 -0400 From: Peter Eisentraut User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Luzanov Pavel CC: "pgsql-docs@postgresql.org" Subject: Re: Moving documentation to XML References: <1428009501118.85114@postgrespro.ru> In-Reply-To: <1428009501118.85114@postgrespro.ru> Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:dHSnueOp46zDeoUKU0yvhTpILeFk27dkQjuMQqHhFDq47F43nca s6jlgghonxaH/GGdYjsSqP7/5EKe/yMWc+WX1DkMxzpHzWvW+1Temeub7HyYrjfp3uuof3f FJxA/mu2QLqn1HDt9tyI8d5SVxO0HAc3f8JZdKjkawlxaT35/8xSIM3c2p4fgaC7K0/BFP2 CDfFYEtp0BW05SIGUrpmw== X-UI-Out-Filterresults: notjunk:1; X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-docs Precedence: bulk Sender: pgsql-docs-owner@postgresql.org On 4/2/15 5:22 PM, Luzanov Pavel wrote: > Peter, > > > I found this message in archives: > > http://www.postgresql.org/message-id/flat/519C3D99.9000304@gmx.net#519C3D99.9000304@gmx.net > > > and, as you recommend, tested a speed of building docs on a fresh Ubuntu > installation. > > 50sec for make html > and 14min 50sec for make xslthtml > 17 times slower! > > > Is it still a main stopper for moving to XML? Yes :) -- Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-docs From a.lakhin@postgrespro.ru Sun May 24 04:56:37 2026 Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Zqlkr-0007b5-Th for pgsql-docs@arkaria.postgresql.org; Mon, 26 Oct 2015 17:40:22 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1Zqlkr-0003fL-Ch for pgsql-docs@arkaria.postgresql.org; Mon, 26 Oct 2015 17:40:21 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZqfP4-0007GP-Gq for pgsql-docs@postgresql.org; Mon, 26 Oct 2015 10:53:26 +0000 Received: from newmail.postgrespro.ru ([93.174.131.138] helo=mail.postgrespro.ru) by magus.postgresql.org with esmtp (Exim 4.84) (envelope-from ) id 1ZqfOw-0001Hr-Ox for pgsql-docs@postgresql.org; Mon, 26 Oct 2015 10:53:21 +0000 Received: from [1.0.0.7] (unknown [109.196.196.151]) by mail.postgrespro.ru (Postfix) with ESMTPSA id 8268E21C3D9A; Mon, 26 Oct 2015 13:53:16 +0300 (MSK) Subject: Re: Moving documentation to XML To: Peter Eisentraut References: <1428009501118.85114@postgrespro.ru> <5522E656.4060201@gmx.net> Cc: Luzanov Pavel , "pgsql-docs@postgresql.org" From: Alexander Lakhin Message-ID: <562E061B.1090809@postgrespro.ru> Date: Mon, 26 Oct 2015 13:53:15 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <5522E656.4060201@gmx.net> Content-Type: multipart/mixed; boundary="------------090707030100020607060303" X-Pg-Spam-Score: 1.4 (+) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-docs Precedence: bulk Sender: pgsql-docs-owner@postgresql.org This is a multi-part message in MIME format. --------------090707030100020607060303 Content-Type: text/plain; charset=koi8-r; format=flowed Content-Transfer-Encoding: 7bit Hello, Peter. I've managed to speed up html generation from xml (make xslthtml) from 32 min. (in my environment) to 4 min. by modifying slowest XSL templates. All my modifications incorporated in a single file stylesheet-xhtml-speedup.xsl, which is included in stylesheet.xsl. I performed optimization by analyzing output of: xsltproc --profile --stringparam pg.version '9.6devel' stylesheet.xsl postgres.xml Initial statistics: number match name mode Calls Tot 100us Avg 0 appendix label.markup 23090 90677526 3927 1 chapter label.markup 28870 39740757 1376 2 chunk-all-sections 1289 23845066 18498 3 make.legalnotice.head.links 2578 9630258 3735 4 indexterm reference 2579 4126513 1600 5 html.head 1289 3112534 2414 ... index % time self children called name 0.479 1326.034 22/23090 toc.line [61] 5.128 1308.245 21944/23090 sect1[label.markup] [13] 3.772 1318.264 850/23090 substitute-markup [15] 1.355 1304.631 274/23090 figure|table|example[label.markup] [32] [0] 47.95 906.775 1.613 23090 appendix[label.markup] [0] 1.613 0.000 23090/23090 autolabel.format [29] ----------------------------------------------- 5.128 1308.245 24708/28870 sect1[label.markup] [13] 0.479 1326.034 130/28870 toc.line [61] 3.772 1318.264 2112/28870 substitute-markup [15] 1.355 1304.631 1920/28870 figure|table|example[label.markup] [32] [1] 21.01 397.408 1.613 28870 chapter[label.markup] [1] 1.613 0.000 28870/28870 autolabel.format [29] ----------------------------------------------- 0.164 238.606 1289/1289 process-chunk-element [98] [2] 12.61 238.451 0.225 1289 chunk-all-sections [2] 0.225 7.117 1289/1289 process-chunk [86] ----------------------------------------------- 31.125 112.261 1289/2578 html.head [5] 96.303 96.726 1289/2578 make.legalnotice.head.links [3] [3] 5.09 96.303 96.726 2578 make.legalnotice.head.links [3] 96.303 96.726 1289/3867 make.legalnotice.head.links [3] 0.339 0.494 1289/3867 *[object.title.markup.textonly] [69] 0.085 0.781 1289/3867 ln.or.rh.filename [116] ----------------------------------------------- Currrent statistics: number match name mode Calls Tot 100us Avg 0 chunk-all-sections 1289 5405958 4193 1 make.legalnotice.head.links 1289 3159538 2451 2 html.head 1289 3068417 2380 3 gentext.template 689835 2327761 3 4 l10n.language 564453 1455253 2 5 href.target 29881 1344063 44 --- index % time self children called name 0.136 54.207 1289/1289 process-chunk-element [95] [0] 20.40 54.060 0.312 1289 chunk-all-sections [0] 0.312 6.468 1289/1289 process-chunk [67] ----------------------------------------------- 30.684 45.458 1289/1289 html.head [2] [1] 11.92 31.595 0.448 1289 make.legalnotice.head.links [1] 0.290 0.403 1289/2578 *[object.title.markup.textonly] [71] 0.159 0.828 1289/2578 ln.or.rh.filename [91] ----------------------------------------------- 0.330 31.617 1289/1289 chunk-element-content [65] [2] 11.58 30.684 45.458 1289 html.head [2] 31.595 0.448 1289/15462 make.legalnotice.head.links [1] 13.441 4.726 5153/15462 href.target [5] 0.290 0.403 5153/15462 *[object.title.markup.textonly] [71] 0.115 1.576 1289/15462 head.content [99] 0.012 0.000 1289/15462 system.head.content [186] 0.006 0.000 1289/15462 user.head.content [228] To make sure that result of the transformation is the same, I've compared original .html's with .html's generated with modified templates. Unfortunately xslt generates random id's, so it's needed to exclude them before comparing. I do that with: for f in */*.html; do sed -e 's/id=\"\(ftn\.\)\?id[a-z][0-9]\+\"/id=\"id\"/g' -i $f ; sed -e 's/href=\"[^#]*#\(ftn\.\)\?id[a-z][0-9]\+\"/href=\"#\"/g' -i $f; done So if it's acceptable way to speed up generation of HTML (and maybe some other formats), what other steps should we take to move away from SGML? If the performance is still not satisfying, please let me know, I'll continue to optimize xslt. Beside performance issues, I can see some difference in results of 'make html' and 'make xslthtml'. For example, see doc/src/sgml/html/spi.html (xslt-generated version doesn't contain the lists of functions). Best regards, Alexander 06.04.2015 23:02, Peter Eisentraut wrote: > On 4/2/15 5:22 PM, Luzanov Pavel wrote: >> Peter, >> >> >> I found this message in archives: >> >> http://www.postgresql.org/message-id/flat/519C3D99.9000304@gmx.net#519C3D99.9000304@gmx.net >> >> >> and, as you recommend, tested a speed of building docs on a fresh Ubuntu >> installation. >> >> 50sec for make html >> and 14min 50sec for make xslthtml >> 17 times slower! >> >> >> Is it still a main stopper for moving to XML? > Yes :) > > > --------------090707030100020607060303 Content-Type: text/x-patch; name="xslt-speedup.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="xslt-speedup.patch" diff --git a/doc/src/sgml/stylesheet-xhtml-speedup.xsl b/doc/src/sgml/style= sheet-xhtml-speedup.xsl new file mode 100644 index 0000000..d52b48e --- /dev/null +++ b/doc/src/sgml/stylesheet-xhtml-speedup.xsl @@ -0,0 +1,327 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +=20=20 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +=20=20 + + + + + + + + + + + + + + + +=20=20 + + + + + + + + + + + + + + + + + + +=20=20=20 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + , + + + + + + + + + + + + + + + + + + + + diff --git a/doc/src/sgml/stylesheet.xsl b/doc/src/sgml/stylesheet.xsl index 7967b36..8b01f41 100644 --- a/doc/src/sgml/stylesheet.xsl +++ b/doc/src/sgml/stylesheet.xsl @@ -6,6 +6,7 @@ =20 + =20 =20 --------------090707030100020607060303 Content-Type: text/plain Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 -- Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-docs --------------090707030100020607060303-- From guillaume@lelarge.info Sun May 24 04:56:37 2026 Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZrPBe-0008D6-Sm for pgsql-docs@arkaria.postgresql.org; Wed, 28 Oct 2015 11:46:39 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZrPBe-0001en-9L for pgsql-docs@arkaria.postgresql.org; Wed, 28 Oct 2015 11:46:38 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZrPBd-0001eD-AA for pgsql-docs@postgresql.org; Wed, 28 Oct 2015 11:46:37 +0000 Received: from mail-wi0-x22f.google.com ([2a00:1450:400c:c05::22f]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1ZrPBW-0001tz-CA for pgsql-docs@postgresql.org; Wed, 28 Oct 2015 11:46:36 +0000 Received: by wicfv8 with SMTP id fv8so9338638wic.0 for ; Wed, 28 Oct 2015 04:46:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lelarge_info.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=6+ZZcMaH5rm+4ORcTqn+Wdz4m0ABl5T39lBsEtRAwDg=; b=k8PRp5PsbqacJtBrI9p5upxE214a9TWPmPKHh4YkObN9jg0Y/rK00QtkR7JU6iwp80 qTQhPuWjI+PkPxD63Z2iO3UvzOtfDW+Wc518PV7V1g1HB05mbcXpet/Gt45TvOXV/NTU ENscPX7erOZbKtgHJ/GZCY3s7Rq9A7DuDSGpRVX7WOPets4CCisKV5xWXOjbkyJKNZmM rF+uxtE62/KNakd3H8N1p+9BkZ0PitT/Hgkk2P5diTtA4wWpYYv9MjmAT4Fz6gsYFbaR lFve/6kp2w2VQVsBAhY93viwl+xs/6KU4A/HabfttL2E8nzd0mi6k6L/8ESc4871FuiT D5vA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=6+ZZcMaH5rm+4ORcTqn+Wdz4m0ABl5T39lBsEtRAwDg=; b=HfaXdM3alpPe9Nx2rXraUg8MOi31sz5uprCb6J1W5aaiuMEi25MT8ePuLQ/GKJt7kf d2HVyndsMEf1ilhIAfOiqeDm60gSZ41ksSUKbZ/1/dFqNbQficr67dXuYOOdC5ZJj0sB khqez7thRIi1EhiY0TF1xXg3hKg78Wiaj8aef8MfZmGH1arW2CRFDWWs6mgwjbknE7Pd HB0isSjIomvXcKTLTW8qefSMg8esOZ4gb2BJw3t4EFgvKQbzCPreJIT6VybQkuehH5TF SxgMuDaYXsfACtLI7l/jOkpyqdpGCVp9P7hqPstoPbPOziFAG5N1sh+I400PInMBUIBK K6iQ== X-Gm-Message-State: ALoCoQlhpZnzOtSxyAWGLYjoITmRNavxXxSAzErh6Paz/qAl6NCy7LeoRcxMLHakWSg8WMiliQ85 MIME-Version: 1.0 X-Received: by 10.180.182.8 with SMTP id ea8mr2400226wic.35.1446032788779; Wed, 28 Oct 2015 04:46:28 -0700 (PDT) Received: by 10.194.186.239 with HTTP; Wed, 28 Oct 2015 04:46:28 -0700 (PDT) Received: by 10.194.186.239 with HTTP; Wed, 28 Oct 2015 04:46:28 -0700 (PDT) In-Reply-To: <562E061B.1090809@postgrespro.ru> References: <1428009501118.85114@postgrespro.ru> <5522E656.4060201@gmx.net> <562E061B.1090809@postgrespro.ru> Date: Wed, 28 Oct 2015 12:46:28 +0100 Message-ID: Subject: Re: Moving documentation to XML From: Guillaume Lelarge To: Alexander Lakhin Cc: "pgsql-docs@postgresql org" , Luzanov Pavel , Peter Eisentraut Content-Type: multipart/alternative; boundary=047d7b66f93bb59003052328beaa X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-docs Precedence: bulk Sender: pgsql-docs-owner@postgresql.org --047d7b66f93bb59003052328beaa Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Le 26 oct. 2015 6:40 PM, "Alexander Lakhin" a =C3=A9crit : > > Hello, Peter. > > I've managed to speed up html generation from xml (make xslthtml) from 32 min. (in my environment) to 4 min. by modifying slowest XSL templates. > All my modifications incorporated in a single file stylesheet-xhtml-speedup.xsl, which is included in stylesheet.xsl. > I performed optimization by analyzing output of: > xsltproc --profile --stringparam pg.version '9.6devel' stylesheet.xsl postgres.xml > Initial statistics: > number match name mode Calls Tot 100us Avg > > 0 appendix label.markup > 23090 90677526 3927 > 1 chapter label.markup > 28870 39740757 1376 > 2 chunk-all-sections 1289 23845066 18498 > 3 make.legalnotice.head.links > 2578 9630258 3735 > 4 indexterm reference 2579 4126513 1600 > 5 html.head 1289 3112534 2414 > ... > index % time self children called name > 0.479 1326.034 22/23090 toc.line [61] > 5.128 1308.245 21944/23090 sect1[label.markup] [13] > 3.772 1318.264 850/23090 substitute-markup [15] > 1.355 1304.631 274/23090 figure|table|example[label.markup] [32] > [0] 47.95 906.775 1.613 23090 appendix[label.markup] [0] > 1.613 0.000 23090/23090 autolabel.format [29] > ----------------------------------------------- > 5.128 1308.245 24708/28870 sect1[label.markup] [13] > 0.479 1326.034 130/28870 toc.line [61] > 3.772 1318.264 2112/28870 substitute-markup [15] > 1.355 1304.631 1920/28870 figure|table|example[label.markup] [32] > [1] 21.01 397.408 1.613 28870 chapter[label.markup] [1] > 1.613 0.000 28870/28870 autolabel.format [29] > ----------------------------------------------- > 0.164 238.606 1289/1289 process-chunk-element [98] > [2] 12.61 238.451 0.225 1289 chunk-all-sections [2] > 0.225 7.117 1289/1289 process-chunk [86] > ----------------------------------------------- > 31.125 112.261 1289/2578 html.head [5] > 96.303 96.726 1289/2578 make.legalnotice.head.links [3= ] > [3] 5.09 96.303 96.726 2578 make.legalnotice.head.links [3] > 96.303 96.726 1289/3867 make.legalnotice.head.links [3= ] > 0.339 0.494 1289/3867 *[object.title.markup.textonly] [69] > 0.085 0.781 1289/3867 ln.or.rh.filename [116] > > ----------------------------------------------- > > > Currrent statistics: > number match name mode Calls Tot 100us Avg > > 0 chunk-all-sections 1289 5405958 4193 > 1 make.legalnotice.head.links > 1289 3159538 2451 > 2 html.head 1289 3068417 2380 > 3 gentext.template 689835 2327761 3 > 4 l10n.language 564453 1455253 2 > 5 href.target 29881 1344063 44 > --- > index % time self children called name > 0.136 54.207 1289/1289 process-chunk-element [95] > [0] 20.40 54.060 0.312 1289 chunk-all-sections [0] > 0.312 6.468 1289/1289 process-chunk [67] > ----------------------------------------------- > 30.684 45.458 1289/1289 html.head [2] > [1] 11.92 31.595 0.448 1289 make.legalnotice.head.links [1] > 0.290 0.403 1289/2578 *[object.title.markup.textonly] [71] > 0.159 0.828 1289/2578 ln.or.rh.filename [91] > ----------------------------------------------- > 0.330 31.617 1289/1289 chunk-element-content [65] > [2] 11.58 30.684 45.458 1289 html.head [2] > 31.595 0.448 1289/15462 make.legalnotice.head.links [1] > 13.441 4.726 5153/15462 href.target [5] > 0.290 0.403 5153/15462 *[object.title.markup.textonly] [71] > 0.115 1.576 1289/15462 head.content [99] > 0.012 0.000 1289/15462 system.head.content [186] > 0.006 0.000 1289/15462 user.head.content [228] > > To make sure that result of the transformation is the same, I've compared original .html's with .html's generated with modified templates. > Unfortunately xslt generates random id's, so it's needed to exclude them before comparing. I do that with: > for f in */*.html; do sed -e 's/id=3D\"\(ftn\.\)\?id[a-z][0-9]\+\"/id=3D\"id\"/g' -i $f ; sed -e 's/href=3D\"[^#]*#\(ftn\.\)\?id[a-z][0-9]\+\"/href=3D\"#\"/g' -i $f; done > > > So if it's acceptable way to speed up generation of HTML (and maybe some other formats), what other steps should we take to move away from SGML? > If the performance is still not satisfying, please let me know, I'll continue to optimize xslt. > Beside performance issues, I can see some difference in results of 'make html' and 'make xslthtml'. For example, see doc/src/sgml/html/spi.html (xslt-generated version doesn't contain the lists of functions). > What you've done is awesome. I can't wait to test it on the french translation. Nice work! --047d7b66f93bb59003052328beaa Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

Le=C2=A026 oct. 2015 6:40 PM, "Alexander Lakhin" &= lt;a.lakhin@postgrespro.ru&g= t; a =C3=A9crit=C2=A0:
>
> Hello, Peter.
>
> I've managed to speed up html generation from xml (make xslthtml) = from 32 min. (in my environment) to 4 min. by modifying slowest XSL templat= es.
> All my modifications incorporated in a single file stylesheet-xhtml-sp= eedup.xsl, which is included in stylesheet.xsl.
> I performed optimization by analyzing output of:
> xsltproc --profile --stringparam pg.version '9.6devel' stylesh= eet.xsl postgres.xml
> Initial statistics:
> number=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0match=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 name=C2=A0 =C2=A0 =C2= =A0 mode Calls Tot 100us Avg
>
> =C2=A0 =C2=A0 0=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0appendi= x label.markup
> 23090 90677526=C2=A0 =C2=A03927
> =C2=A0 =C2=A0 1=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 chapte= r label.markup
> 28870 39740757=C2=A0 =C2=A01376
> =C2=A0 =C2=A0 2 chunk-all-sections=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A01289 23845066=C2=A0 18498
> =C2=A0 =C2=A0 3=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0make.legalnotice.head.links
> 2578 9630258=C2=A0 =C2=A03735
> =C2=A0 =C2=A0 4=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 indexterm ref= erence=C2=A0 =C2=A02579 4126513=C2=A0 =C2=A01600
> =C2=A0 =C2=A0 5 html.head=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A01289 3112534=C2=A0 =C2=A02414
> ...
> index % time=C2=A0 =C2=A0 self=C2=A0 children=C2=A0 =C2=A0 called=C2= =A0 =C2=A0 =C2=A0name
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 0.479 1326.034= =C2=A0 =C2=A0 =C2=A022/23090=C2=A0 =C2=A0 =C2=A0toc.line [61]
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 5.128 1308.245= =C2=A0 21944/23090 sect1[label.markup] [13]
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 3.772 1318.264= =C2=A0 =C2=A0 850/23090 substitute-markup [15]
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 1.355 1304.631= =C2=A0 =C2=A0 274/23090 figure|table|example[label.markup] [32]
> [0]=C2=A0 =C2=A0 47.95=C2=A0 906.775=C2=A0 =C2=A0 1.613=C2=A0 23090 ap= pendix[label.markup] [0]
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 1.613=C2=A0 = =C2=A0 0.000=C2=A0 23090/23090 autolabel.format [29]
> -----------------------------------------------
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 5.128 1308.245= =C2=A0 24708/28870 sect1[label.markup] [13]
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 0.479 1326.034= =C2=A0 =C2=A0 130/28870=C2=A0 =C2=A0 =C2=A0toc.line [61]
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 3.772 1318.264= =C2=A0 =C2=A02112/28870 substitute-markup [15]
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 1.355 1304.631= =C2=A0 =C2=A01920/28870 figure|table|example[label.markup] [32]
> [1]=C2=A0 =C2=A0 21.01=C2=A0 397.408=C2=A0 =C2=A0 1.613=C2=A0 28870 ch= apter[label.markup] [1]
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 1.613=C2=A0 = =C2=A0 0.000=C2=A0 28870/28870 autolabel.format [29]
> -----------------------------------------------
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 0.164=C2=A0 23= 8.606=C2=A0 =C2=A01289/1289 process-chunk-element [98]
> [2]=C2=A0 =C2=A0 12.61=C2=A0 238.451=C2=A0 =C2=A0 0.225=C2=A0 =C2=A012= 89 chunk-all-sections [2]
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 0.225=C2=A0 = =C2=A0 7.117=C2=A0 =C2=A01289/1289 process-chunk [86]
> -----------------------------------------------
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A031.125=C2=A0 11= 2.261=C2=A0 =C2=A01289/2578=C2=A0 =C2=A0 =C2=A0 html.head [5]
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A096.303=C2=A0 = =C2=A096.726=C2=A0 =C2=A01289/2578 make.legalnotice.head.links [3]
> [3]=C2=A0 =C2=A0 =C2=A05.09=C2=A0 =C2=A096.303=C2=A0 =C2=A096.726=C2= =A0 =C2=A02578 make.legalnotice.head.links [3]
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A096.303=C2=A0 = =C2=A096.726=C2=A0 =C2=A01289/3867 make.legalnotice.head.links [3]
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 0.339=C2=A0 = =C2=A0 0.494=C2=A0 =C2=A01289/3867 *[object.title.markup.textonly] [69]
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 0.085=C2=A0 = =C2=A0 0.781=C2=A0 =C2=A01289/3867 ln.or.rh.filename [116]
>
> -----------------------------------------------
>
>
> Currrent statistics:
> number=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0match=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 name=C2=A0 =C2=A0 =C2= =A0 mode Calls Tot 100us Avg
>
> =C2=A0 =C2=A0 0 chunk-all-sections=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A01289 5405958=C2=A0 =C2=A04193
> =C2=A0 =C2=A0 1=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0make.legalnotice.head.links
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A01289 3159= 538=C2=A0 =C2=A02451
> =C2=A0 =C2=A0 2 html.head=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A01289 3068417=C2=A0 =C2=A02380
> =C2=A0 =C2=A0 3=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0gentext.template 689835 2327761=C2=A0 = =C2=A0 =C2=A0 3
> =C2=A0 =C2=A0 4=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 l10n.language 564453 1455253=C2= =A0 =C2=A0 =C2=A0 2
> =C2=A0 =C2=A0 5 href.target=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 2= 9881 1344063=C2=A0 =C2=A0 =C2=A044
> ---
> index % time=C2=A0 =C2=A0 self=C2=A0 children=C2=A0 =C2=A0 called=C2= =A0 =C2=A0 =C2=A0name
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 0.136=C2=A0 = =C2=A054.207=C2=A0 =C2=A01289/1289 process-chunk-element [95]
> [0]=C2=A0 =C2=A0 20.40=C2=A0 =C2=A054.060=C2=A0 =C2=A0 0.312=C2=A0 =C2= =A01289 chunk-all-sections [0]
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 0.312=C2=A0 = =C2=A0 6.468=C2=A0 =C2=A01289/1289 process-chunk [67]
> -----------------------------------------------
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A030.684=C2=A0 = =C2=A045.458=C2=A0 =C2=A01289/1289=C2=A0 =C2=A0 =C2=A0 html.head [2]
> [1]=C2=A0 =C2=A0 11.92=C2=A0 =C2=A031.595=C2=A0 =C2=A0 0.448=C2=A0 =C2= =A01289 make.legalnotice.head.links [1]
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 0.290=C2=A0 = =C2=A0 0.403=C2=A0 =C2=A01289/2578 *[object.title.markup.textonly] [71]
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 0.159=C2=A0 = =C2=A0 0.828=C2=A0 =C2=A01289/2578 ln.or.rh.filename [91]
> -----------------------------------------------
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 0.330=C2=A0 = =C2=A031.617=C2=A0 =C2=A01289/1289 chunk-element-content [65]
> [2]=C2=A0 =C2=A0 11.58=C2=A0 =C2=A030.684=C2=A0 =C2=A045.458=C2=A0 =C2= =A01289=C2=A0 =C2=A0 =C2=A0html.head [2]
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A031.595=C2=A0 = =C2=A0 0.448=C2=A0 =C2=A01289/15462 make.legalnotice.head.links [1]
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A013.441=C2=A0 = =C2=A0 4.726=C2=A0 =C2=A05153/15462 href.target [5]
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 0.290=C2=A0 = =C2=A0 0.403=C2=A0 =C2=A05153/15462 *[object.title.markup.textonly] [71] > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 0.115=C2=A0 = =C2=A0 1.576=C2=A0 =C2=A01289/15462 head.content [99]
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 0.012=C2=A0 = =C2=A0 0.000=C2=A0 =C2=A01289/15462 system.head.content [186]
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 0.006=C2=A0 = =C2=A0 0.000=C2=A0 =C2=A01289/15462 user.head.content [228]
>
> To make sure that result of the transformation is the same, I've c= ompared original .html's with .html's generated with modified templ= ates.
> Unfortunately xslt generates random id's, so it's needed to ex= clude them before comparing. I do that with:
> for f in */*.html; do sed -e 's/id=3D\"\(ftn\.\)\?id[a-z][0-9= ]\+\"/id=3D\"id\"/g' -i $f ; sed -e 's/href=3D\"= ;[^#]*#\(ftn\.\)\?id[a-z][0-9]\+\"/href=3D\"#\"/g' -i $f= ; done
>
>
> So if it's acceptable way to speed up generation of HTML (and mayb= e some other formats), what other steps should we take to move away from SG= ML?
> If the performance is still not satisfying, please let me know, I'= ll continue to optimize xslt.
> Beside performance issues, I can see some difference in results of = 9;make html' and 'make xslthtml'. For example, see doc/src/sgml= /html/spi.html (xslt-generated version doesn't contain the lists of fun= ctions).
>

What you've done is awesome. I can't wait to test it= on the french translation.

Nice work!

--047d7b66f93bb59003052328beaa-- From a.lakhin@postgrespro.ru Sun May 24 04:56:37 2026 Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZsBJI-0005ps-CR for pgsql-docs@arkaria.postgresql.org; Fri, 30 Oct 2015 15:09:44 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZsBJH-0000Lc-VH for pgsql-docs@arkaria.postgresql.org; Fri, 30 Oct 2015 15:09:44 +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) (envelope-from ) id 1Zs9vQ-0003gK-RC for pgsql-docs@postgresql.org; Fri, 30 Oct 2015 13:41:01 +0000 Received: from newmail.postgrespro.ru ([93.174.131.138] helo=mail.postgrespro.ru) by makus.postgresql.org with esmtp (Exim 4.84) (envelope-from ) id 1Zs9vL-0008OW-W8 for pgsql-docs@postgresql.org; Fri, 30 Oct 2015 13:40:59 +0000 Received: from [1.0.0.7] (unknown [109.196.196.153]) by mail.postgrespro.ru (Postfix) with ESMTPSA id EA7C721C40F8 for ; Fri, 30 Oct 2015 16:40:54 +0300 (MSK) To: "pgsql-docs@postgresql.org" From: Alexander Lakhin Subject: Re: Moving documentation to XML Message-ID: <56337365.2080104@postgrespro.ru> Date: Fri, 30 Oct 2015 16:40:53 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------010101000405030909050105" X-Pg-Spam-Score: -2.9 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-docs Precedence: bulk Sender: pgsql-docs-owner@postgresql.org This is a multi-part message in MIME format. --------------010101000405030909050105 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Hello, Guillaume. We have plans to use this for russian translation, too. We translate the docs by converting (with xml2po) the single xml to postgres-ru.po and after translating it we convert it back to xml (we get postres-ru.xml here). (Until now we had to perform one more conversion (postgres-ru.xml -> set of sgml's).) So now we can get russian html/* with: python xml2po.py -l ru -k -p postgres-ru.po postgres.xml >postgres-ru.xml xsltproc --stringparam pg.version '9.4.1' stylesheet.xsl postgres-ru.xml But I had some doubts about DSSSL and XSL differences. As I noted previously there was at least one visible difference. So I decided to customize XSL templates to make sure that html's are generated without a loss or corruption. I thought that comparing two HTML sources will not work, as they are too different, but maybe we can compare text generated from html by lynx, for example. So I use the following procedure to look for differences: 0. Get dsssl-generated html's make html 1. Extract text content from html's: for f in html/*.html; do fn=`basename $f`; echo $fn; cat $f | perl -0pi -pe 's/Note:\s*<\/B\s*>/\

Note<\/h3>/g' | perl -0pi -pe 's/>
/tmp/$fn; lynx /tmp/$fn --dump >html-text/$fn; * Some differences are not significant so it's not reasonable to modify XSL templates to eliminate them. Difference in "Note" placement and spelling is one of them, so I just filter it out. 2. Rename html to html-o and html-text to html-o-text. 3. Generate html's with XSL (use modified templates): rm -r html; xsltproc --stringparam pg.version '9.4.1' stylesheet.xsl postgres.xml 4. Extract text content from html's as above. 5. Make sure that two text html's are identical: diff -s -u -b -I '^\s*_\+\s*$' html-o-text/xtypes.html html-text/xtypes.html * Differences in whitespaces and length of "____" lines are not significant, too. For now, I've managed to get the same xtypes.html (I tested my XSL customizations with it), but I think, we can eliminate other most outstanding (or maybe all) differences likewise. I can describe XSL customizations in more details, if needed. Best regards, Alexander P.S. I couldn't post the message as a reply due to error on the postgresql.org side. (: host makus.postgresql.org[174.143.35.229] said: 550 Message headers fail syntax check (in reply to end of DATA command)) 28.10.2015 14:46, Guillaume Lelarge wrote: > > Le 26 oct. 2015 6:40 PM, "Alexander Lakhin" > a écrit : > > > ... > > To make sure that result of the transformation is the same, I've > compared original .html's with .html's generated with modified templates. > > Unfortunately xslt generates random id's, so it's needed to exclude > them before comparing. I do that with: > > for f in */*.html; do sed -e > 's/id=\"\(ftn\.\)\?id[a-z][0-9]\+\"/id=\"id\"/g' -i $f ; sed -e > 's/href=\"[^#]*#\(ftn\.\)\?id[a-z][0-9]\+\"/href=\"#\"/g' -i $f; done > > > > > > So if it's acceptable way to speed up generation of HTML (and maybe > some other formats), what other steps should we take to move away from > SGML? > > If the performance is still not satisfying, please let me know, I'll > continue to optimize xslt. > > Beside performance issues, I can see some difference in results of > 'make html' and 'make xslthtml'. For example, see > doc/src/sgml/html/spi.html (xslt-generated version doesn't contain the > lists of functions). > > > > What you've done is awesome. I can't wait to test it on the french > translation. > > Nice work! > --------------010101000405030909050105 Content-Type: text/x-patch; name="xslt-customize.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="xslt-customize.patch" diff --git a/doc/src/sgml/stylesheet-xhtml-dsssl-like.xsl b/doc/src/sgml/st= ylesheet-xhtml-dsssl-like.xsl new file mode 100644 index 0000000..95ca042 --- /dev/null +++ b/doc/src/sgml/stylesheet-xhtml-dsssl-like.xsl @@ -0,0 +1,266 @@ + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + +
+ + + + + + + + +
+ + + + + + + + + + + + +   + + + + + + + + + + + + + + +   + + + + + + +   + + +   + + + + + + + + + + + + +
+
+ +
+
+
+
+
+ + + + + + + + + + + + + + + +
+ +
+
+ + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + +   + + + + + + + + + + + + + +  |  + + +   + + + + + + + + + + -toc + + + + + + + + +   + + + + + + + + + + + + +
+ + + +   + + + + + + + + + + + + + + +   + + +   + + + +
+
+
+
+
+ + + + + + + title-unnumbered + title + + + + + + + + + + + + + + + +
diff --git a/doc/src/sgml/stylesheet-xhtml-speedup.xsl b/doc/src/sgml/style= sheet-xhtml-speedup.xsl new file mode 100644 index 0000000..d52b48e --- /dev/null +++ b/doc/src/sgml/stylesheet-xhtml-speedup.xsl @@ -0,0 +1,327 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +=20=20 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +=20=20 + + + + + + + + + + + + + + + +=20=20 + + + + + + + + + + + + + + + + + + +=20=20=20 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + , + + + + + + + + + + + + + + + + + + + + diff --git a/doc/src/sgml/stylesheet.xsl b/doc/src/sgml/stylesheet.xsl index 7967b36..07be4a7 100644 --- a/doc/src/sgml/stylesheet.xsl +++ b/doc/src/sgml/stylesheet.xsl @@ -6,6 +6,8 @@ =20 + + =20 =20 @@ -13,7 +15,7 @@ - + pgsql-docs@postgresql.org @@ -21,6 +23,9 @@ =20 =20 + + + stylesheet.css --------------010101000405030909050105 Content-Type: text/plain Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 -- Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-docs --------------010101000405030909050105-- From stefan@kaltenbrunner.cc Sun May 24 04:56:37 2026 Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZtLWH-0000KP-FH for pgsql-docs@arkaria.postgresql.org; Mon, 02 Nov 2015 20:15:57 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZtLWG-0003t7-PD for pgsql-docs@arkaria.postgresql.org; Mon, 02 Nov 2015 20:15:56 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZtLWF-0003sc-Tt for pgsql-docs@postgresql.org; Mon, 02 Nov 2015 20:15:55 +0000 Received: from cronos.madness.at ([2a02:16a8:dc41::10]) by magus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1ZtLWD-0004bR-6k for pgsql-docs@postgresql.org; Mon, 02 Nov 2015 20:15:55 +0000 Received: from mastermind.kaltenbrunner.cc ([2001:470:7a2d::22]) by cronos.madness.at with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1ZtLW8-00050o-Hs; Mon, 02 Nov 2015 21:15:50 +0100 Subject: Re: Moving documentation to XML To: Alexander Lakhin References: <56337365.2080104@postgrespro.ru> Cc: "pgsql-docs@postgresql.org" From: Stefan Kaltenbrunner Message-ID: <5637C472.6070800@kaltenbrunner.cc> Date: Mon, 2 Nov 2015 21:15:46 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <56337365.2080104@postgrespro.ru> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-docs Precedence: bulk Sender: pgsql-docs-owner@postgresql.org On 10/30/2015 02:40 PM, Alexander Lakhin wrote: > Hello, Guillaume. > > We have plans to use this for russian translation, too. We translate the > docs by converting (with xml2po) the single xml to postgres-ru.po and > after translating it we convert it back to xml (we get postres-ru.xml > here). (Until now we had to perform one more conversion > (postgres-ru.xml -> set of sgml's).) > So now we can get russian html/* with: > python xml2po.py -l ru -k -p postgres-ru.po postgres.xml >postgres-ru.xml > xsltproc --stringparam pg.version '9.4.1' stylesheet.xsl postgres-ru.xml > > But I had some doubts about DSSSL and XSL differences. As I noted > previously there was at least one visible difference. So I decided to > customize XSL templates to make sure that html's are generated without a > loss or corruption. > I thought that comparing two HTML sources will not work, as they are too > different, but maybe we can compare text generated from html by lynx, > for example. > So I use the following procedure to look for differences: > 0. Get dsssl-generated html's > make html > 1. Extract text content from html's: > for f in html/*.html; do fn=`basename $f`; echo $fn; cat $f | perl -0pi > -pe 's/Note:\s*<\/B\s*>/\

Note<\/h3>/g' | perl -0pi -pe > 's/>
/tmp/$fn; lynx /tmp/$fn --dump >>html-text/$fn; > * Some differences are not significant so it's not reasonable to modify > XSL templates to eliminate them. Difference in "Note" placement and > spelling is one of them, so I just filter it out. > 2. Rename html to html-o and html-text to html-o-text. > 3. Generate html's with XSL (use modified templates): > rm -r html; xsltproc --stringparam pg.version '9.4.1' stylesheet.xsl > postgres.xml > 4. Extract text content from html's as above. > 5. Make sure that two text html's are identical: > diff -s -u -b -I '^\s*_\+\s*$' html-o-text/xtypes.html > html-text/xtypes.html > * Differences in whitespaces and length of "____" lines are not > significant, too. > > For now, I've managed to get the same xtypes.html (I tested my XSL > customizations with it), but I think, we can eliminate other most > outstanding (or maybe all) differences likewise. > I can describe XSL customizations in more details, if needed. > > Best regards, > Alexander > > P.S. I couldn't post the message as a reply due to error on the > postgresql.org side. > (: host makus.postgresql.org[174.143.35.229] > said: > 550 Message headers fail syntax check (in reply to end of DATA > command)) Sorry for not replying earlier but most of the sysadmin team is not tracking pgsql-docs that closely for issues - afaiks there was a typo in your mail - the "To" in your mail looked like this: To: pgsql-docs@postgresql org References: <1428009501118.85114@postgrespro.ru> <5522E656.4060201@gmx.net> <562E061B.1090809@postgrespro.ru> notice that there is a space after "pgsql-docs@postgresql" instead of what I suspect should be a "." causing the header syntax check in exim to barf on the mail. Stefan -- Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-docs From obartunov@gmail.com Sun May 24 04:56:37 2026 Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZtffX-0004oY-F6 for pgsql-docs@arkaria.postgresql.org; Tue, 03 Nov 2015 17:46:51 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZtffW-0008HB-Rl for pgsql-docs@arkaria.postgresql.org; Tue, 03 Nov 2015 17:46:50 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZtffW-0008H2-9A for pgsql-docs@postgresql.org; Tue, 03 Nov 2015 17:46:50 +0000 Received: from mail-lf0-x22c.google.com ([2a00:1450:4010:c07::22c]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1ZtffS-0003Jg-0P for pgsql-docs@postgresql.org; Tue, 03 Nov 2015 17:46:49 +0000 Received: by lfbn126 with SMTP id n126so26973324lfb.2 for ; Tue, 03 Nov 2015 09:46:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=03T6K74HZeQIDXHuVm2XINx7AEsG5J/33I8ed+vqcFc=; b=LVwiOBaRrWP9BxC3nOWvbdsOBPpovq3lUu0Xa4yw9uPJDxaFoNLPgZtxY0LKDrNkbq UhpudFgvB5cymCkJh/hyQsaKnXb11Q0ihbNpYkGd0HxHhcSCsYla2W/p40WO+DflEBXX F101o86kaAjLaDe+0HmEtmSdfAiMrFPLb/vst26Whjp5vgme0vvAle8rY3JvUWw51zrn mhkchYv/NIYkcFsLwwLjLsoP6ZhkXnpnNg7rrJy1NHS7ELlQfV2wo+tJyyPhOoE43H9+ fw9iKdQNoE6s0u2na3TxtdpDpYoJHE6i3EEFc8fSyiRPHwfNg9ptwSMpSad/de5uR/Z7 X3FQ== X-Received: by 10.112.199.4 with SMTP id jg4mr13227190lbc.59.1446572804423; Tue, 03 Nov 2015 09:46:44 -0800 (PST) MIME-Version: 1.0 Received: by 10.25.156.13 with HTTP; Tue, 3 Nov 2015 09:46:25 -0800 (PST) Reply-To: obartunov@gmail.com In-Reply-To: <562E061B.1090809@postgrespro.ru> References: <1428009501118.85114@postgrespro.ru> <5522E656.4060201@gmx.net> <562E061B.1090809@postgrespro.ru> From: Oleg Bartunov Date: Tue, 3 Nov 2015 18:46:25 +0100 Message-ID: Subject: Re: Moving documentation to XML To: Alexander Lakhin Cc: Peter Eisentraut , Luzanov Pavel , "pgsql-docs@postgresql.org" Content-Type: multipart/alternative; boundary=001a11c324b0267e6a0523a67a7c X-Pg-Spam-Score: -2.7 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-docs Precedence: bulk Sender: pgsql-docs-owner@postgresql.org --001a11c324b0267e6a0523a67a7c Content-Type: text/plain; charset=UTF-8 On Mon, Oct 26, 2015 at 11:53 AM, Alexander Lakhin wrote: > Hello, Peter. > > I've managed to speed up html generation from xml (make xslthtml) from 32 > min. (in my environment) to 4 min. by modifying slowest XSL templates. > All my modifications incorporated in a single file > stylesheet-xhtml-speedup.xsl, which is included in stylesheet.xsl. > I performed optimization by analyzing output of: > xsltproc --profile --stringparam pg.version '9.6devel' stylesheet.xsl > postgres.xml > Initial statistics: > number match name mode Calls Tot 100us > Avg > > 0 appendix label.markup > 23090 90677526 3927 > 1 chapter label.markup > 28870 39740757 1376 > 2 chunk-all-sections 1289 23845066 18498 > 3 make.legalnotice.head.links > 2578 9630258 3735 > 4 indexterm reference 2579 4126513 1600 > 5 html.head 1289 3112534 2414 > ... > index % time self children called name > 0.479 1326.034 22/23090 toc.line [61] > 5.128 1308.245 21944/23090 sect1[label.markup] [13] > 3.772 1318.264 850/23090 substitute-markup [15] > 1.355 1304.631 274/23090 > figure|table|example[label.markup] [32] > [0] 47.95 906.775 1.613 23090 appendix[label.markup] [0] > 1.613 0.000 23090/23090 autolabel.format [29] > ----------------------------------------------- > 5.128 1308.245 24708/28870 sect1[label.markup] [13] > 0.479 1326.034 130/28870 toc.line [61] > 3.772 1318.264 2112/28870 substitute-markup [15] > 1.355 1304.631 1920/28870 > figure|table|example[label.markup] [32] > [1] 21.01 397.408 1.613 28870 chapter[label.markup] [1] > 1.613 0.000 28870/28870 autolabel.format [29] > ----------------------------------------------- > 0.164 238.606 1289/1289 process-chunk-element [98] > [2] 12.61 238.451 0.225 1289 chunk-all-sections [2] > 0.225 7.117 1289/1289 process-chunk [86] > ----------------------------------------------- > 31.125 112.261 1289/2578 html.head [5] > 96.303 96.726 1289/2578 make.legalnotice.head.links [3] > [3] 5.09 96.303 96.726 2578 make.legalnotice.head.links [3] > 96.303 96.726 1289/3867 make.legalnotice.head.links [3] > 0.339 0.494 1289/3867 *[object.title.markup.textonly] > [69] > 0.085 0.781 1289/3867 ln.or.rh.filename [116] > > ----------------------------------------------- > > > Currrent statistics: > number match name mode Calls Tot 100us > Avg > > 0 chunk-all-sections 1289 5405958 4193 > 1 make.legalnotice.head.links > 1289 3159538 > 2451 > 2 html.head 1289 3068417 2380 > 3 gentext.template 689835 2327761 3 > 4 l10n.language 564453 1455253 2 > 5 href.target 29881 1344063 44 > --- > index % time self children called name > 0.136 54.207 1289/1289 process-chunk-element [95] > [0] 20.40 54.060 0.312 1289 chunk-all-sections [0] > 0.312 6.468 1289/1289 process-chunk [67] > ----------------------------------------------- > 30.684 45.458 1289/1289 html.head [2] > [1] 11.92 31.595 0.448 1289 make.legalnotice.head.links [1] > 0.290 0.403 1289/2578 *[object.title.markup.textonly] > [71] > 0.159 0.828 1289/2578 ln.or.rh.filename [91] > ----------------------------------------------- > 0.330 31.617 1289/1289 chunk-element-content [65] > [2] 11.58 30.684 45.458 1289 html.head [2] > 31.595 0.448 1289/15462 make.legalnotice.head.links [1] > 13.441 4.726 5153/15462 href.target [5] > 0.290 0.403 5153/15462 > *[object.title.markup.textonly] [71] > 0.115 1.576 1289/15462 head.content [99] > 0.012 0.000 1289/15462 system.head.content [186] > 0.006 0.000 1289/15462 user.head.content [228] > > To make sure that result of the transformation is the same, I've compared > original .html's with .html's generated with modified templates. > Unfortunately xslt generates random id's, so it's needed to exclude them > before comparing. I do that with: > for f in */*.html; do sed -e > 's/id=\"\(ftn\.\)\?id[a-z][0-9]\+\"/id=\"id\"/g' -i $f ; sed -e > 's/href=\"[^#]*#\(ftn\.\)\?id[a-z][0-9]\+\"/href=\"#\"/g' -i $f; done > > > So if it's acceptable way to speed up generation of HTML (and maybe some > other formats), what other steps should we take to move away from SGML? > If the performance is still not satisfying, please let me know, I'll > continue to optimize xslt. > Beside performance issues, I can see some difference in results of 'make > html' and 'make xslthtml'. For example, see doc/src/sgml/html/spi.html > (xslt-generated version doesn't contain the lists of functions). > > Best regards, > Alexander I think this is great result and it's worth to start moving to xml. I want to note, that it's 21-th century and we should think about including pictures into our documentation, which will greatly improve it. XML makes this easier. > > > > > 06.04.2015 23:02, Peter Eisentraut wrote: > >> On 4/2/15 5:22 PM, Luzanov Pavel wrote: >> >>> Peter, >>> >>> >>> I found this message in archives: >>> >>> >>> http://www.postgresql.org/message-id/flat/519C3D99.9000304@gmx.net#519C3D99.9000304@gmx.net >>> >>> >>> and, as you recommend, tested a speed of building docs on a fresh Ubuntu >>> installation. >>> >>> 50sec for make html >>> and 14min 50sec for make xslthtml >>> 17 times slower! >>> >>> >>> Is it still a main stopper for moving to XML? >>> >> Yes :) >> >> >> >> > > > -- > Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-docs > > --001a11c324b0267e6a0523a67a7c Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


On Mon, Oct 26, 2015 at 11:53 AM, Alexander Lakhin &l= t;a.lakhin@pos= tgrespro.ru> wrote:
Hello, = Peter.

I've managed to speed up html generation from xml (make xslthtml) from = 32 min. (in my environment) to 4 min. by modifying slowest XSL templates. All my modifications incorporated in a single file stylesheet-xhtml-speedup= .xsl, which is included in stylesheet.xsl.
I performed optimization by analyzing output of:
xsltproc --profile --stringparam pg.version '9.6devel' stylesheet.x= sl postgres.xml
Initial statistics:
number=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0match=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 name=C2=A0 =C2=A0 =C2=A0 m= ode Calls Tot 100us Avg

=C2=A0 =C2=A0 0=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0appendix lab= el.markup
23090 90677526=C2=A0 =C2=A03927
=C2=A0 =C2=A0 1=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 chapter lab= el.markup
28870 39740757=C2=A0 =C2=A01376
=C2=A0 =C2=A0 2 chunk-all-sections=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A01289 23845066=C2=A0 18498
=C2=A0 =C2=A0 3=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0make.legalnotice.head.links
2578 9630258=C2=A0 =C2=A03735
=C2=A0 =C2=A0 4=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 indexterm referenc= e=C2=A0 =C2=A02579 4126513=C2=A0 =C2=A01600
=C2=A0 =C2=A0 5 html.head=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A012= 89 3112534=C2=A0 =C2=A02414
...
index % time=C2=A0 =C2=A0 self=C2=A0 children=C2=A0 =C2=A0 called=C2=A0 =C2= =A0 =C2=A0name
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 0.479 1326.034=C2= =A0 =C2=A0 =C2=A022/23090=C2=A0 =C2=A0 =C2=A0toc.line [61]
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 5.128 1308.245=C2= =A0 21944/23090 sect1[label.markup] [13]
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 3.772 1318.264=C2= =A0 =C2=A0 850/23090 substitute-markup [15]
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 1.355 1304.631=C2= =A0 =C2=A0 274/23090 figure|table|example[label.markup] [32]
[0]=C2=A0 =C2=A0 47.95=C2=A0 906.775=C2=A0 =C2=A0 1.613=C2=A0 23090 appendi= x[label.markup] [0]
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 1.613=C2=A0 =C2=A0 = 0.000=C2=A0 23090/23090 autolabel.format [29]
-----------------------------------------------
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 5.128 1308.245=C2= =A0 24708/28870 sect1[label.markup] [13]
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 0.479 1326.034=C2= =A0 =C2=A0 130/28870=C2=A0 =C2=A0 =C2=A0toc.line [61]
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 3.772 1318.264=C2= =A0 =C2=A02112/28870 substitute-markup [15]
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 1.355 1304.631=C2= =A0 =C2=A01920/28870 figure|table|example[label.markup] [32]
[1]=C2=A0 =C2=A0 21.01=C2=A0 397.408=C2=A0 =C2=A0 1.613=C2=A0 28870 chapter= [label.markup] [1]
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 1.613=C2=A0 =C2=A0 = 0.000=C2=A0 28870/28870 autolabel.format [29]
-----------------------------------------------
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 0.164=C2=A0 238.606= =C2=A0 =C2=A01289/1289 process-chunk-element [98]
[2]=C2=A0 =C2=A0 12.61=C2=A0 238.451=C2=A0 =C2=A0 0.225=C2=A0 =C2=A01289 ch= unk-all-sections [2]
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 0.225=C2=A0 =C2=A0 = 7.117=C2=A0 =C2=A01289/1289 process-chunk [86]
-----------------------------------------------
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A031.125=C2=A0 112.261= =C2=A0 =C2=A01289/2578=C2=A0 =C2=A0 =C2=A0 html.head [5]
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A096.303=C2=A0 =C2=A09= 6.726=C2=A0 =C2=A01289/2578 make.legalnotice.head.links [3]
[3]=C2=A0 =C2=A0 =C2=A05.09=C2=A0 =C2=A096.303=C2=A0 =C2=A096.726=C2=A0 =C2= =A02578 make.legalnotice.head.links [3]
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A096.303=C2=A0 =C2=A09= 6.726=C2=A0 =C2=A01289/3867 make.legalnotice.head.links [3]
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 0.339=C2=A0 =C2=A0 = 0.494=C2=A0 =C2=A01289/3867 *[object.title.markup.textonly] [69]
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 0.085=C2=A0 =C2=A0 = 0.781=C2=A0 =C2=A01289/3867 ln.or.rh.filename [116]

-----------------------------------------------


Currrent statistics:
number=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0match=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 name=C2=A0 =C2=A0 =C2=A0 m= ode Calls Tot 100us Avg

=C2=A0 =C2=A0 0 chunk-all-sections=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A01289 5405958=C2=A0 =C2=A04193
=C2=A0 =C2=A0 1=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0make.legalnotice.head.links
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A01289 3159538= =C2=A0 =C2=A02451
=C2=A0 =C2=A0 2 html.head=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A012= 89 3068417=C2=A0 =C2=A02380
=C2=A0 =C2=A0 3=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0gentext.template 689835 2327761=C2=A0 =C2=A0= =C2=A0 3
=C2=A0 =C2=A0 4=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 l10n.language 564453 1455253=C2=A0 = =C2=A0 =C2=A0 2
=C2=A0 =C2=A0 5 href.target=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 29881 = 1344063=C2=A0 =C2=A0 =C2=A044
---
index % time=C2=A0 =C2=A0 self=C2=A0 children=C2=A0 =C2=A0 called=C2=A0 =C2= =A0 =C2=A0name
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 0.136=C2=A0 =C2=A05= 4.207=C2=A0 =C2=A01289/1289 process-chunk-element [95]
[0]=C2=A0 =C2=A0 20.40=C2=A0 =C2=A054.060=C2=A0 =C2=A0 0.312=C2=A0 =C2=A012= 89 chunk-all-sections [0]
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 0.312=C2=A0 =C2=A0 = 6.468=C2=A0 =C2=A01289/1289 process-chunk [67]
-----------------------------------------------
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A030.684=C2=A0 =C2=A04= 5.458=C2=A0 =C2=A01289/1289=C2=A0 =C2=A0 =C2=A0 html.head [2]
[1]=C2=A0 =C2=A0 11.92=C2=A0 =C2=A031.595=C2=A0 =C2=A0 0.448=C2=A0 =C2=A012= 89 make.legalnotice.head.links [1]
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 0.290=C2=A0 =C2=A0 = 0.403=C2=A0 =C2=A01289/2578 *[object.title.markup.textonly] [71]
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 0.159=C2=A0 =C2=A0 = 0.828=C2=A0 =C2=A01289/2578 ln.or.rh.filename [91]
-----------------------------------------------
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 0.330=C2=A0 =C2=A03= 1.617=C2=A0 =C2=A01289/1289 chunk-element-content [65]
[2]=C2=A0 =C2=A0 11.58=C2=A0 =C2=A030.684=C2=A0 =C2=A045.458=C2=A0 =C2=A012= 89=C2=A0 =C2=A0 =C2=A0html.head [2]
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A031.595=C2=A0 =C2=A0 = 0.448=C2=A0 =C2=A01289/15462 make.legalnotice.head.links [1]
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A013.441=C2=A0 =C2=A0 = 4.726=C2=A0 =C2=A05153/15462 href.target [5]
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 0.290=C2=A0 =C2=A0 = 0.403=C2=A0 =C2=A05153/15462 *[object.title.markup.textonly] [71]
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 0.115=C2=A0 =C2=A0 = 1.576=C2=A0 =C2=A01289/15462 head.content [99]
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 0.012=C2=A0 =C2=A0 = 0.000=C2=A0 =C2=A01289/15462 system.head.content [186]
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 0.006=C2=A0 =C2=A0 = 0.000=C2=A0 =C2=A01289/15462 user.head.content [228]

To make sure that result of the transformation is the same, I've compar= ed original .html's with .html's generated with modified templates.=
Unfortunately xslt generates random id's, so it's needed to exclude= them before comparing. I do that with:
for f in */*.html; do sed -e 's/id=3D\"\(ftn\.\)\?id[a-z][0-9]\+\&= quot;/id=3D\"id\"/g' -i $f ; sed -e 's/href=3D\"[^#]= *#\(ftn\.\)\?id[a-z][0-9]\+\"/href=3D\"#\"/g' -i $f; don= e


So if it's acceptable way to speed up generation of HTML (and maybe som= e other formats), what other steps should we take to move away from SGML? If the performance is still not satisfying, please let me know, I'll co= ntinue to optimize xslt.
Beside performance issues, I can see some difference in results of 'mak= e html' and 'make xslthtml'. For example, see doc/src/sgml/html= /spi.html (xslt-generated version doesn't contain the lists of function= s).

Best regards,
Alexander

I think this is great result=C2= =A0 and it's worth to start moving to xml. I want to note, that it'= s 21-th century=C2=A0 and we should think about including pictures into our= documentation, which will greatly improve it. XML makes this easier.
<= /div>

=C2=A0




06.04.2015 23:02, Peter Eisentraut wrote:
On 4/2/15 5:22 PM, Luzanov Pavel wrote:
Peter,


I found this message in archives:

http://ww= w.postgresql.org/message-id/flat/519C3D99.9000304@gmx.net#519C3D99.9000304@= gmx.net


and, as you recommend, tested a speed of building docs on a fresh Ubuntu installation.

50sec for make html
and 14min 50sec for make xslthtml
17 times slower!


Is it still a main stopper for moving to XML?
Yes :)






--
Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs


--001a11c324b0267e6a0523a67a7c-- From dmitigr@gmail.com Sun May 24 04:56:37 2026 Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Zthv9-0001io-7x for pgsql-docs@arkaria.postgresql.org; Tue, 03 Nov 2015 20:11:07 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1Zthv8-0007Gk-M5 for pgsql-docs@arkaria.postgresql.org; Tue, 03 Nov 2015 20:11:06 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1Zthv8-0007GW-0H for pgsql-docs@postgresql.org; Tue, 03 Nov 2015 20:11:06 +0000 Received: from mail-io0-x244.google.com ([2607:f8b0:4001:c06::244]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1Zthv4-0006C3-3S for pgsql-docs@postgresql.org; Tue, 03 Nov 2015 20:11:05 +0000 Received: by iodd200 with SMTP id d200so2964746iod.0 for ; Tue, 03 Nov 2015 12:10:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=ANdMVOPwUsD3bRrKuEIVt5u7ZPsdHndiz07Gr9EDNKc=; b=zCbjCA2f5l2VWsOKez9dBeihrrJ4JInFVAeZH7uMleqNbCGXE5LJvbPaxWE9PCG1WV fPZyR/YDa+qh5IqtsDFlxVkvjfyF3NYspKNtt+2l/FOfwANF3DkfGB8lS7jI3OJC2ftm 0WR4qk+Tnh5c1AgqdMAGaG5H0q0+K317bLuxycU/Jj6oFwQm87i7YQQk2MRcWhK8yIAD c0U24dQm7A76mmj4WkJzAr2lKz65wNkvsBFsWJD1iAkURlCj11RiWvjx54Gj+e/lQgrM YkXq2gYuy7FFebalQ2q5fGzI5DXJd8C0HhEVOQoi0X1Erf3i+Z+P/0dYNoYuKhHJFS0z cs4w== MIME-Version: 1.0 X-Received: by 10.107.30.10 with SMTP id e10mr36577626ioe.43.1446581459401; Tue, 03 Nov 2015 12:10:59 -0800 (PST) Received: by 10.79.72.131 with HTTP; Tue, 3 Nov 2015 12:10:59 -0800 (PST) In-Reply-To: References: <1428009501118.85114@postgrespro.ru> <5522E656.4060201@gmx.net> <562E061B.1090809@postgrespro.ru> Date: Tue, 3 Nov 2015 23:10:59 +0300 Message-ID: Subject: Re: Moving documentation to XML From: Dmitry Igrishin To: Oleg Bartunov Cc: Alexander Lakhin , Peter Eisentraut , Luzanov Pavel , "pgsql-docs@postgresql.org" Content-Type: multipart/alternative; boundary=001a1140f33c06c2570523a87ec7 X-Pg-Spam-Score: -2.7 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-docs Precedence: bulk Sender: pgsql-docs-owner@postgresql.org --001a1140f33c06c2570523a87ec7 Content-Type: text/plain; charset=UTF-8 2015-11-03 20:46 GMT+03:00 Oleg Bartunov : > > > On Mon, Oct 26, 2015 at 11:53 AM, Alexander Lakhin < > a.lakhin@postgrespro.ru> wrote: > >> Hello, Peter. >> >> I've managed to speed up html generation from xml (make xslthtml) from 32 >> min. (in my environment) to 4 min. by modifying slowest XSL templates. >> All my modifications incorporated in a single file >> stylesheet-xhtml-speedup.xsl, which is included in stylesheet.xsl. >> I performed optimization by analyzing output of: >> xsltproc --profile --stringparam pg.version '9.6devel' stylesheet.xsl >> postgres.xml >> Initial statistics: >> number match name mode Calls Tot 100us >> Avg >> >> 0 appendix label.markup >> 23090 90677526 3927 >> 1 chapter label.markup >> 28870 39740757 1376 >> 2 chunk-all-sections 1289 23845066 18498 >> 3 make.legalnotice.head.links >> 2578 9630258 3735 >> 4 indexterm reference 2579 4126513 1600 >> 5 html.head 1289 3112534 2414 >> ... >> index % time self children called name >> 0.479 1326.034 22/23090 toc.line [61] >> 5.128 1308.245 21944/23090 sect1[label.markup] [13] >> 3.772 1318.264 850/23090 substitute-markup [15] >> 1.355 1304.631 274/23090 >> figure|table|example[label.markup] [32] >> [0] 47.95 906.775 1.613 23090 appendix[label.markup] [0] >> 1.613 0.000 23090/23090 autolabel.format [29] >> ----------------------------------------------- >> 5.128 1308.245 24708/28870 sect1[label.markup] [13] >> 0.479 1326.034 130/28870 toc.line [61] >> 3.772 1318.264 2112/28870 substitute-markup [15] >> 1.355 1304.631 1920/28870 >> figure|table|example[label.markup] [32] >> [1] 21.01 397.408 1.613 28870 chapter[label.markup] [1] >> 1.613 0.000 28870/28870 autolabel.format [29] >> ----------------------------------------------- >> 0.164 238.606 1289/1289 process-chunk-element [98] >> [2] 12.61 238.451 0.225 1289 chunk-all-sections [2] >> 0.225 7.117 1289/1289 process-chunk [86] >> ----------------------------------------------- >> 31.125 112.261 1289/2578 html.head [5] >> 96.303 96.726 1289/2578 make.legalnotice.head.links [3] >> [3] 5.09 96.303 96.726 2578 make.legalnotice.head.links [3] >> 96.303 96.726 1289/3867 make.legalnotice.head.links [3] >> 0.339 0.494 1289/3867 >> *[object.title.markup.textonly] [69] >> 0.085 0.781 1289/3867 ln.or.rh.filename [116] >> >> ----------------------------------------------- >> >> >> Currrent statistics: >> number match name mode Calls Tot 100us >> Avg >> >> 0 chunk-all-sections 1289 5405958 4193 >> 1 make.legalnotice.head.links >> 1289 3159538 >> 2451 >> 2 html.head 1289 3068417 2380 >> 3 gentext.template 689835 2327761 3 >> 4 l10n.language 564453 1455253 2 >> 5 href.target 29881 1344063 44 >> --- >> index % time self children called name >> 0.136 54.207 1289/1289 process-chunk-element [95] >> [0] 20.40 54.060 0.312 1289 chunk-all-sections [0] >> 0.312 6.468 1289/1289 process-chunk [67] >> ----------------------------------------------- >> 30.684 45.458 1289/1289 html.head [2] >> [1] 11.92 31.595 0.448 1289 make.legalnotice.head.links [1] >> 0.290 0.403 1289/2578 >> *[object.title.markup.textonly] [71] >> 0.159 0.828 1289/2578 ln.or.rh.filename [91] >> ----------------------------------------------- >> 0.330 31.617 1289/1289 chunk-element-content [65] >> [2] 11.58 30.684 45.458 1289 html.head [2] >> 31.595 0.448 1289/15462 make.legalnotice.head.links >> [1] >> 13.441 4.726 5153/15462 href.target [5] >> 0.290 0.403 5153/15462 >> *[object.title.markup.textonly] [71] >> 0.115 1.576 1289/15462 head.content [99] >> 0.012 0.000 1289/15462 system.head.content [186] >> 0.006 0.000 1289/15462 user.head.content [228] >> >> To make sure that result of the transformation is the same, I've compared >> original .html's with .html's generated with modified templates. >> Unfortunately xslt generates random id's, so it's needed to exclude them >> before comparing. I do that with: >> for f in */*.html; do sed -e >> 's/id=\"\(ftn\.\)\?id[a-z][0-9]\+\"/id=\"id\"/g' -i $f ; sed -e >> 's/href=\"[^#]*#\(ftn\.\)\?id[a-z][0-9]\+\"/href=\"#\"/g' -i $f; done >> >> >> So if it's acceptable way to speed up generation of HTML (and maybe some >> other formats), what other steps should we take to move away from SGML? >> If the performance is still not satisfying, please let me know, I'll >> continue to optimize xslt. >> Beside performance issues, I can see some difference in results of 'make >> html' and 'make xslthtml'. For example, see doc/src/sgml/html/spi.html >> (xslt-generated version doesn't contain the lists of functions). >> >> Best regards, >> Alexander > > > I think this is great result and it's worth to start moving to xml. > I think that moving to XML is step backward, because XML is ugly. > I want to note, that it's 21-th century and we should think about > including pictures into our documentation, which will greatly improve it. > Yeah, +1. > XML makes this easier. > And I think that Lisp is much better for this puprose. -- // Dmitry. --001a1140f33c06c2570523a87ec7 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


2015-11-03 20:46 GMT+03:00 Oleg Bartunov <obartunov@gmail.com&g= t;:


On = Mon, Oct 26, 2015 at 11:53 AM, Alexander Lakhin <a.lakhin@postgrespr= o.ru> wrote:
Hello, Peter.<= br>
I've managed to speed up html generation from xml (make xslthtml) from = 32 min. (in my environment) to 4 min. by modifying slowest XSL templates. All my modifications incorporated in a single file stylesheet-xhtml-speedup= .xsl, which is included in stylesheet.xsl.
I performed optimization by analyzing output of:
xsltproc --profile --stringparam pg.version '9.6devel' stylesheet.x= sl postgres.xml
Initial statistics:
number=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0match=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 name=C2=A0 =C2=A0 =C2=A0 m= ode Calls Tot 100us Avg

=C2=A0 =C2=A0 0=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0appendix lab= el.markup
23090 90677526=C2=A0 =C2=A03927
=C2=A0 =C2=A0 1=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 chapter lab= el.markup
28870 39740757=C2=A0 =C2=A01376
=C2=A0 =C2=A0 2 chunk-all-sections=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A01289 23845066=C2=A0 18498
=C2=A0 =C2=A0 3=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0make.legalnotice.head.links
2578 9630258=C2=A0 =C2=A03735
=C2=A0 =C2=A0 4=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 indexterm referenc= e=C2=A0 =C2=A02579 4126513=C2=A0 =C2=A01600
=C2=A0 =C2=A0 5 html.head=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A012= 89 3112534=C2=A0 =C2=A02414
...
index % time=C2=A0 =C2=A0 self=C2=A0 children=C2=A0 =C2=A0 called=C2=A0 =C2= =A0 =C2=A0name
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 0.479 1326.034=C2= =A0 =C2=A0 =C2=A022/23090=C2=A0 =C2=A0 =C2=A0toc.line [61]
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 5.128 1308.245=C2= =A0 21944/23090 sect1[label.markup] [13]
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 3.772 1318.264=C2= =A0 =C2=A0 850/23090 substitute-markup [15]
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 1.355 1304.631=C2= =A0 =C2=A0 274/23090 figure|table|example[label.markup] [32]
[0]=C2=A0 =C2=A0 47.95=C2=A0 906.775=C2=A0 =C2=A0 1.613=C2=A0 23090 appendi= x[label.markup] [0]
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 1.613=C2=A0 =C2=A0 = 0.000=C2=A0 23090/23090 autolabel.format [29]
-----------------------------------------------
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 5.128 1308.245=C2= =A0 24708/28870 sect1[label.markup] [13]
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 0.479 1326.034=C2= =A0 =C2=A0 130/28870=C2=A0 =C2=A0 =C2=A0toc.line [61]
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 3.772 1318.264=C2= =A0 =C2=A02112/28870 substitute-markup [15]
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 1.355 1304.631=C2= =A0 =C2=A01920/28870 figure|table|example[label.markup] [32]
[1]=C2=A0 =C2=A0 21.01=C2=A0 397.408=C2=A0 =C2=A0 1.613=C2=A0 28870 chapter= [label.markup] [1]
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 1.613=C2=A0 =C2=A0 = 0.000=C2=A0 28870/28870 autolabel.format [29]
-----------------------------------------------
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 0.164=C2=A0 238.606= =C2=A0 =C2=A01289/1289 process-chunk-element [98]
[2]=C2=A0 =C2=A0 12.61=C2=A0 238.451=C2=A0 =C2=A0 0.225=C2=A0 =C2=A01289 ch= unk-all-sections [2]
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 0.225=C2=A0 =C2=A0 = 7.117=C2=A0 =C2=A01289/1289 process-chunk [86]
-----------------------------------------------
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A031.125=C2=A0 112.261= =C2=A0 =C2=A01289/2578=C2=A0 =C2=A0 =C2=A0 html.head [5]
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A096.303=C2=A0 =C2=A09= 6.726=C2=A0 =C2=A01289/2578 make.legalnotice.head.links [3]
[3]=C2=A0 =C2=A0 =C2=A05.09=C2=A0 =C2=A096.303=C2=A0 =C2=A096.726=C2=A0 =C2= =A02578 make.legalnotice.head.links [3]
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A096.303=C2=A0 =C2=A09= 6.726=C2=A0 =C2=A01289/3867 make.legalnotice.head.links [3]
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 0.339=C2=A0 =C2=A0 = 0.494=C2=A0 =C2=A01289/3867 *[object.title.markup.textonly] [69]
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 0.085=C2=A0 =C2=A0 = 0.781=C2=A0 =C2=A01289/3867 ln.or.rh.filename [116]

-----------------------------------------------


Currrent statistics:
number=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0match=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 name=C2=A0 =C2=A0 =C2=A0 m= ode Calls Tot 100us Avg

=C2=A0 =C2=A0 0 chunk-all-sections=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A01289 5405958=C2=A0 =C2=A04193
=C2=A0 =C2=A0 1=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0make.legalnotice.head.links
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A01289 3159538= =C2=A0 =C2=A02451
=C2=A0 =C2=A0 2 html.head=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A012= 89 3068417=C2=A0 =C2=A02380
=C2=A0 =C2=A0 3=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0gentext.template 689835 2327761=C2=A0 =C2=A0= =C2=A0 3
=C2=A0 =C2=A0 4=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 l10n.language 564453 1455253=C2=A0 = =C2=A0 =C2=A0 2
=C2=A0 =C2=A0 5 href.target=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 29881 = 1344063=C2=A0 =C2=A0 =C2=A044
---
index % time=C2=A0 =C2=A0 self=C2=A0 children=C2=A0 =C2=A0 called=C2=A0 =C2= =A0 =C2=A0name
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 0.136=C2=A0 =C2=A05= 4.207=C2=A0 =C2=A01289/1289 process-chunk-element [95]
[0]=C2=A0 =C2=A0 20.40=C2=A0 =C2=A054.060=C2=A0 =C2=A0 0.312=C2=A0 =C2=A012= 89 chunk-all-sections [0]
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 0.312=C2=A0 =C2=A0 = 6.468=C2=A0 =C2=A01289/1289 process-chunk [67]
-----------------------------------------------
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A030.684=C2=A0 =C2=A04= 5.458=C2=A0 =C2=A01289/1289=C2=A0 =C2=A0 =C2=A0 html.head [2]
[1]=C2=A0 =C2=A0 11.92=C2=A0 =C2=A031.595=C2=A0 =C2=A0 0.448=C2=A0 =C2=A012= 89 make.legalnotice.head.links [1]
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 0.290=C2=A0 =C2=A0 = 0.403=C2=A0 =C2=A01289/2578 *[object.title.markup.textonly] [71]
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 0.159=C2=A0 =C2=A0 = 0.828=C2=A0 =C2=A01289/2578 ln.or.rh.filename [91]
-----------------------------------------------
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 0.330=C2=A0 =C2=A03= 1.617=C2=A0 =C2=A01289/1289 chunk-element-content [65]
[2]=C2=A0 =C2=A0 11.58=C2=A0 =C2=A030.684=C2=A0 =C2=A045.458=C2=A0 =C2=A012= 89=C2=A0 =C2=A0 =C2=A0html.head [2]
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A031.595=C2=A0 =C2=A0 = 0.448=C2=A0 =C2=A01289/15462 make.legalnotice.head.links [1]
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A013.441=C2=A0 =C2=A0 = 4.726=C2=A0 =C2=A05153/15462 href.target [5]
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 0.290=C2=A0 =C2=A0 = 0.403=C2=A0 =C2=A05153/15462 *[object.title.markup.textonly] [71]
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 0.115=C2=A0 =C2=A0 = 1.576=C2=A0 =C2=A01289/15462 head.content [99]
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 0.012=C2=A0 =C2=A0 = 0.000=C2=A0 =C2=A01289/15462 system.head.content [186]
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 0.006=C2=A0 =C2=A0 = 0.000=C2=A0 =C2=A01289/15462 user.head.content [228]

To make sure that result of the transformation is the same, I've compar= ed original .html's with .html's generated with modified templates.=
Unfortunately xslt generates random id's, so it's needed to exclude= them before comparing. I do that with:
for f in */*.html; do sed -e 's/id=3D\"\(ftn\.\)\?id[a-z][0-9]\+\&= quot;/id=3D\"id\"/g' -i $f ; sed -e 's/href=3D\"[^#]= *#\(ftn\.\)\?id[a-z][0-9]\+\"/href=3D\"#\"/g' -i $f; don= e


So if it's acceptable way to speed up generation of HTML (and maybe som= e other formats), what other steps should we take to move away from SGML? If the performance is still not satisfying, please let me know, I'll co= ntinue to optimize xslt.
Beside performance issues, I can see some difference in results of 'mak= e html' and 'make xslthtml'. For example, see doc/src/sgml/html= /spi.html (xslt-generated version doesn't contain the lists of function= s).

Best regards,
Alexander

I think this is great= result=C2=A0 and it's worth to start moving to xml.
=
I think that moving to XML is step backward, becaus= e XML is ugly.
I want to note, that it= 's 21-th century=C2=A0 and we should think about including pictures int= o our documentation, which will greatly improve it.
=
Yeah, +1.
XML makes = this easier.
And I think that= Lisp is much better for this =C2=A0puprose.

-- <= br>
// Dmitry.

<= /div>
--001a1140f33c06c2570523a87ec7-- From tair.sabirgaliev@bee.kz Sun May 24 04:56:37 2026 Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZtoY4-0008Qw-NU for pgsql-docs@arkaria.postgresql.org; Wed, 04 Nov 2015 03:15:45 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZtoY4-00036J-1h for pgsql-docs@arkaria.postgresql.org; Wed, 04 Nov 2015 03:15:44 +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) (envelope-from ) id 1ZtoY2-00031p-1U for pgsql-docs@postgresql.org; Wed, 04 Nov 2015 03:15:42 +0000 Received: from mail-wm0-x229.google.com ([2a00:1450:400c:c09::229]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1ZtoXy-0005Np-7R for pgsql-docs@postgresql.org; Wed, 04 Nov 2015 03:15:40 +0000 Received: by wmff134 with SMTP id f134so30695519wmf.0 for ; Tue, 03 Nov 2015 19:15:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bee.kz; s=beekz; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-type; bh=ZL9GGSiXESpidUG2bFRl8mHRiIRgbAjehV1B+0J6YYM=; b=V+4Lb8NSwq+PcTjhD6rtmdPkZxiurVVugVWYuladbEcqBznxPqO02h+NwBYY8pX+yf 9tvrRsfLTsytjZGA03+IPVqu67Sufh0aM8dQa+FVnnJgiYVEKUWwjF+SdJr9k1YoqBWM yFIBQ5KuNISKi0GicCHD6o/IG3IPME4/XcrZA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-type; bh=ZL9GGSiXESpidUG2bFRl8mHRiIRgbAjehV1B+0J6YYM=; b=CF4B2+kaf1gj9tgbDH04LreYpMeh3UB3GSrIFI8LRUC6jBI5cU9Xpgr8lFwTF+EJKH wYhCXbNBGOr/CphgCyI3srtIjKAoWkUWE0nkeONekbuA3xO4AaJ+WcEZBsY9KsHwUQOK mrthPjQBDLvMvBHDdeP+3CCZ5ELAIJeoj85asgrIK4ctTR4SgtLesDuoJPppe7rDNu9U toYibb9hWaoL3EcAXbgHdNtAA0/OFHAGpi8UjXYKnR/ud+HX/xpp+4cnE43UHCKNVaTG zxjzxz2iUAkcdJHiZU1D1auQ9Pha9fOk6Dghjv7ysd4eqb8KASOBIpO/VjFQc4KQBjns cNfQ== X-Gm-Message-State: ALoCoQlgzc3xqIbvtLbMg0tccmzCq3dNBntZNwFdiYatVLq7bMc59SG7HlgXUTr1nwL/zq8i1vJq X-Received: by 10.28.92.209 with SMTP id q200mr25264951wmb.52.1446606933650; Tue, 03 Nov 2015 19:15:33 -0800 (PST) MIME-Version: 1.0 References: <1428009501118.85114@postgrespro.ru> <5522E656.4060201@gmx.net> <562E061B.1090809@postgrespro.ru> In-Reply-To: From: Tair Sabirgaliev Date: Wed, 04 Nov 2015 03:15:23 +0000 Message-ID: Subject: Re: Moving documentation to XML To: Dmitry Igrishin , Oleg Bartunov Cc: Alexander Lakhin , Peter Eisentraut , Luzanov Pavel , "pgsql-docs@postgresql.org" Content-Type: multipart/alternative; boundary=001a1146ffb469008f0523ae6c8b X-Pg-Spam-Score: -1.8 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-docs Precedence: bulk Sender: pgsql-docs-owner@postgresql.org --001a1146ffb469008f0523ae6c8b Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Then there is asciidoc.. On =D0=A1=D1=80, 4 =D0=BD=D0=BE=D1=8F=D0=B1. 2015 =D0=B3. at 2:11 Dmitry Ig= rishin wrote: > 2015-11-03 20:46 GMT+03:00 Oleg Bartunov : > >> >> >> On Mon, Oct 26, 2015 at 11:53 AM, Alexander Lakhin < >> a.lakhin@postgrespro.ru> wrote: >> >>> Hello, Peter. >>> >>> I've managed to speed up html generation from xml (make xslthtml) from >>> 32 min. (in my environment) to 4 min. by modifying slowest XSL template= s. >>> All my modifications incorporated in a single file >>> stylesheet-xhtml-speedup.xsl, which is included in stylesheet.xsl. >>> I performed optimization by analyzing output of: >>> xsltproc --profile --stringparam pg.version '9.6devel' stylesheet.xsl >>> postgres.xml >>> Initial statistics: >>> number match name mode Calls Tot 100u= s >>> Avg >>> >>> 0 appendix label.markup >>> 23090 90677526 3927 >>> 1 chapter label.markup >>> 28870 39740757 1376 >>> 2 chunk-all-sections 1289 23845066 18498 >>> 3 make.legalnotice.head.links >>> 2578 9630258 3735 >>> 4 indexterm reference 2579 4126513 1600 >>> 5 html.head 1289 3112534 2414 >>> ... >>> index % time self children called name >>> 0.479 1326.034 22/23090 toc.line [61] >>> 5.128 1308.245 21944/23090 sect1[label.markup] [13] >>> 3.772 1318.264 850/23090 substitute-markup [15] >>> 1.355 1304.631 274/23090 >>> figure|table|example[label.markup] [32] >>> [0] 47.95 906.775 1.613 23090 appendix[label.markup] [0] >>> 1.613 0.000 23090/23090 autolabel.format [29] >>> ----------------------------------------------- >>> 5.128 1308.245 24708/28870 sect1[label.markup] [13] >>> 0.479 1326.034 130/28870 toc.line [61] >>> 3.772 1318.264 2112/28870 substitute-markup [15] >>> 1.355 1304.631 1920/28870 >>> figure|table|example[label.markup] [32] >>> [1] 21.01 397.408 1.613 28870 chapter[label.markup] [1] >>> 1.613 0.000 28870/28870 autolabel.format [29] >>> ----------------------------------------------- >>> 0.164 238.606 1289/1289 process-chunk-element [98] >>> [2] 12.61 238.451 0.225 1289 chunk-all-sections [2] >>> 0.225 7.117 1289/1289 process-chunk [86] >>> ----------------------------------------------- >>> 31.125 112.261 1289/2578 html.head [5] >>> 96.303 96.726 1289/2578 make.legalnotice.head.links >>> [3] >>> [3] 5.09 96.303 96.726 2578 make.legalnotice.head.links [3] >>> 96.303 96.726 1289/3867 make.legalnotice.head.links >>> [3] >>> 0.339 0.494 1289/3867 >>> *[object.title.markup.textonly] [69] >>> 0.085 0.781 1289/3867 ln.or.rh.filename [116] >>> >>> ----------------------------------------------- >>> >>> >>> Currrent statistics: >>> number match name mode Calls Tot 100u= s >>> Avg >>> >>> 0 chunk-all-sections 1289 5405958 4193 >>> 1 make.legalnotice.head.links >>> 1289 3159538 >>> 2451 >>> 2 html.head 1289 3068417 2380 >>> 3 gentext.template 689835 2327761 3 >>> 4 l10n.language 564453 1455253 2 >>> 5 href.target 29881 1344063 44 >>> --- >>> index % time self children called name >>> 0.136 54.207 1289/1289 process-chunk-element [95] >>> [0] 20.40 54.060 0.312 1289 chunk-all-sections [0] >>> 0.312 6.468 1289/1289 process-chunk [67] >>> ----------------------------------------------- >>> 30.684 45.458 1289/1289 html.head [2] >>> [1] 11.92 31.595 0.448 1289 make.legalnotice.head.links [1] >>> 0.290 0.403 1289/2578 >>> *[object.title.markup.textonly] [71] >>> 0.159 0.828 1289/2578 ln.or.rh.filename [91] >>> ----------------------------------------------- >>> 0.330 31.617 1289/1289 chunk-element-content [65] >>> [2] 11.58 30.684 45.458 1289 html.head [2] >>> 31.595 0.448 1289/15462 make.legalnotice.head.links >>> [1] >>> 13.441 4.726 5153/15462 href.target [5] >>> 0.290 0.403 5153/15462 >>> *[object.title.markup.textonly] [71] >>> 0.115 1.576 1289/15462 head.content [99] >>> 0.012 0.000 1289/15462 system.head.content [186] >>> 0.006 0.000 1289/15462 user.head.content [228] >>> >>> To make sure that result of the transformation is the same, I've >>> compared original .html's with .html's generated with modified template= s. >>> Unfortunately xslt generates random id's, so it's needed to exclude the= m >>> before comparing. I do that with: >>> for f in */*.html; do sed -e >>> 's/id=3D\"\(ftn\.\)\?id[a-z][0-9]\+\"/id=3D\"id\"/g' -i $f ; sed -e >>> 's/href=3D\"[^#]*#\(ftn\.\)\?id[a-z][0-9]\+\"/href=3D\"#\"/g' -i $f; do= ne >>> >>> >>> So if it's acceptable way to speed up generation of HTML (and maybe som= e >>> other formats), what other steps should we take to move away from SGML? >>> If the performance is still not satisfying, please let me know, I'll >>> continue to optimize xslt. >>> Beside performance issues, I can see some difference in results of 'mak= e >>> html' and 'make xslthtml'. For example, see doc/src/sgml/html/spi.html >>> (xslt-generated version doesn't contain the lists of functions). >>> >>> Best regards, >>> Alexander >> >> >> I think this is great result and it's worth to start moving to xml. >> > I think that moving to XML is step backward, because XML is ugly. > >> I want to note, that it's 21-th century and we should think about >> including pictures into our documentation, which will greatly improve it= . >> > Yeah, +1. > >> XML makes this easier. >> > And I think that Lisp is much better for this puprose. > > -- > // Dmitry. > > --001a1146ffb469008f0523ae6c8b Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Then there is asciidoc..
On = =D0=A1=D1=80, 4 =D0=BD=D0=BE=D1=8F=D0=B1. 2015 =D0=B3. at 2:11 Dmitry Igris= hin <dmitigr@gmail.com> wrot= e:
2015-11-03 20:46 GMT+03:00 Oleg Bart= unov <obartunov@gmail.com>:


On Mon, Oct 26, 2015 at 11:53 AM, Alexander Lakhin <a.lakhin@postgrespro.ru> wrote:
Hello, Peter.

I've managed to speed up html generation from xml (make xslthtml) from = 32 min. (in my environment) to 4 min. by modifying slowest XSL templates. All my modifications incorporated in a single file stylesheet-xhtml-speedup= .xsl, which is included in stylesheet.xsl.
I performed optimization by analyzing output of:
xsltproc --profile --stringparam pg.version '9.6devel' stylesheet.x= sl postgres.xml
Initial statistics:
number=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0match=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 name=C2=A0 =C2=A0 =C2=A0 m= ode Calls Tot 100us Avg

=C2=A0 =C2=A0 0=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0appendix lab= el.markup
23090 90677526=C2=A0 =C2=A03927
=C2=A0 =C2=A0 1=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 chapter lab= el.markup
28870 39740757=C2=A0 =C2=A01376
=C2=A0 =C2=A0 2 chunk-all-sections=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A01289 23845066=C2=A0 18498
=C2=A0 =C2=A0 3=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0make.legalnotice.head.links
2578 9630258=C2=A0 =C2=A03735
=C2=A0 =C2=A0 4=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 indexterm referenc= e=C2=A0 =C2=A02579 4126513=C2=A0 =C2=A01600
=C2=A0 =C2=A0 5 html.head=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A012= 89 3112534=C2=A0 =C2=A02414
...
index % time=C2=A0 =C2=A0 self=C2=A0 children=C2=A0 =C2=A0 called=C2=A0 =C2= =A0 =C2=A0name
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 0.479 1326.034=C2= =A0 =C2=A0 =C2=A022/23090=C2=A0 =C2=A0 =C2=A0toc.line [61]
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 5.128 1308.245=C2= =A0 21944/23090 sect1[label.markup] [13]
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 3.772 1318.264=C2= =A0 =C2=A0 850/23090 substitute-markup [15]
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 1.355 1304.631=C2= =A0 =C2=A0 274/23090 figure|table|example[label.markup] [32]
[0]=C2=A0 =C2=A0 47.95=C2=A0 906.775=C2=A0 =C2=A0 1.613=C2=A0 23090 appendi= x[label.markup] [0]
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 1.613=C2=A0 =C2=A0 = 0.000=C2=A0 23090/23090 autolabel.format [29]
-----------------------------------------------
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 5.128 1308.245=C2= =A0 24708/28870 sect1[label.markup] [13]
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 0.479 1326.034=C2= =A0 =C2=A0 130/28870=C2=A0 =C2=A0 =C2=A0toc.line [61]
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 3.772 1318.264=C2= =A0 =C2=A02112/28870 substitute-markup [15]
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 1.355 1304.631=C2= =A0 =C2=A01920/28870 figure|table|example[label.markup] [32]
[1]=C2=A0 =C2=A0 21.01=C2=A0 397.408=C2=A0 =C2=A0 1.613=C2=A0 28870 chapter= [label.markup] [1]
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 1.613=C2=A0 =C2=A0 = 0.000=C2=A0 28870/28870 autolabel.format [29]
-----------------------------------------------
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 0.164=C2=A0 238.606= =C2=A0 =C2=A01289/1289 process-chunk-element [98]
[2]=C2=A0 =C2=A0 12.61=C2=A0 238.451=C2=A0 =C2=A0 0.225=C2=A0 =C2=A01289 ch= unk-all-sections [2]
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 0.225=C2=A0 =C2=A0 = 7.117=C2=A0 =C2=A01289/1289 process-chunk [86]
-----------------------------------------------
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A031.125=C2=A0 112.261= =C2=A0 =C2=A01289/2578=C2=A0 =C2=A0 =C2=A0 html.head [5]
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A096.303=C2=A0 =C2=A09= 6.726=C2=A0 =C2=A01289/2578 make.legalnotice.head.links [3]
[3]=C2=A0 =C2=A0 =C2=A05.09=C2=A0 =C2=A096.303=C2=A0 =C2=A096.726=C2=A0 =C2= =A02578 make.legalnotice.head.links [3]
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A096.303=C2=A0 =C2=A09= 6.726=C2=A0 =C2=A01289/3867 make.legalnotice.head.links [3]
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 0.339=C2=A0 =C2=A0 = 0.494=C2=A0 =C2=A01289/3867 *[object.title.markup.textonly] [69]
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 0.085=C2=A0 =C2=A0 = 0.781=C2=A0 =C2=A01289/3867 ln.or.rh.filename [116]

-----------------------------------------------


Currrent statistics:
number=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0match=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 name=C2=A0 =C2=A0 =C2=A0 m= ode Calls Tot 100us Avg

=C2=A0 =C2=A0 0 chunk-all-sections=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A01289 5405958=C2=A0 =C2=A04193
=C2=A0 =C2=A0 1=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0make.legalnotice.head.links
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A01289 3159538= =C2=A0 =C2=A02451
=C2=A0 =C2=A0 2 html.head=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A012= 89 3068417=C2=A0 =C2=A02380
=C2=A0 =C2=A0 3=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0gentext.template 689835 2327761=C2=A0 =C2=A0= =C2=A0 3
=C2=A0 =C2=A0 4=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 l10n.language 564453 1455253=C2=A0 = =C2=A0 =C2=A0 2
=C2=A0 =C2=A0 5 href.target=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 29881 = 1344063=C2=A0 =C2=A0 =C2=A044
---
index % time=C2=A0 =C2=A0 self=C2=A0 children=C2=A0 =C2=A0 called=C2=A0 =C2= =A0 =C2=A0name
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 0.136=C2=A0 =C2=A05= 4.207=C2=A0 =C2=A01289/1289 process-chunk-element [95]
[0]=C2=A0 =C2=A0 20.40=C2=A0 =C2=A054.060=C2=A0 =C2=A0 0.312=C2=A0 =C2=A012= 89 chunk-all-sections [0]
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 0.312=C2=A0 =C2=A0 = 6.468=C2=A0 =C2=A01289/1289 process-chunk [67]
-----------------------------------------------
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A030.684=C2=A0 =C2=A04= 5.458=C2=A0 =C2=A01289/1289=C2=A0 =C2=A0 =C2=A0 html.head [2]
[1]=C2=A0 =C2=A0 11.92=C2=A0 =C2=A031.595=C2=A0 =C2=A0 0.448=C2=A0 =C2=A012= 89 make.legalnotice.head.links [1]
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 0.290=C2=A0 =C2=A0 = 0.403=C2=A0 =C2=A01289/2578 *[object.title.markup.textonly] [71]
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 0.159=C2=A0 =C2=A0 = 0.828=C2=A0 =C2=A01289/2578 ln.or.rh.filename [91]
-----------------------------------------------
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 0.330=C2=A0 =C2=A03= 1.617=C2=A0 =C2=A01289/1289 chunk-element-content [65]
[2]=C2=A0 =C2=A0 11.58=C2=A0 =C2=A030.684=C2=A0 =C2=A045.458=C2=A0 =C2=A012= 89=C2=A0 =C2=A0 =C2=A0html.head [2]
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A031.595=C2=A0 =C2=A0 = 0.448=C2=A0 =C2=A01289/15462 make.legalnotice.head.links [1]
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A013.441=C2=A0 =C2=A0 = 4.726=C2=A0 =C2=A05153/15462 href.target [5]
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 0.290=C2=A0 =C2=A0 = 0.403=C2=A0 =C2=A05153/15462 *[object.title.markup.textonly] [71]
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 0.115=C2=A0 =C2=A0 = 1.576=C2=A0 =C2=A01289/15462 head.content [99]
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 0.012=C2=A0 =C2=A0 = 0.000=C2=A0 =C2=A01289/15462 system.head.content [186]
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 0.006=C2=A0 =C2=A0 = 0.000=C2=A0 =C2=A01289/15462 user.head.content [228]

To make sure that result of the transformation is the same, I've compar= ed original .html's with .html's generated with modified templates.=
Unfortunately xslt generates random id's, so it's needed to exclude= them before comparing. I do that with:
for f in */*.html; do sed -e 's/id=3D\"\(ftn\.\)\?id[a-z][0-9]\+\&= quot;/id=3D\"id\"/g' -i $f ; sed -e 's/href=3D\"[^#]= *#\(ftn\.\)\?id[a-z][0-9]\+\"/href=3D\"#\"/g' -i $f; don= e


So if it's acceptable way to speed up generation of HTML (and maybe som= e other formats), what other steps should we take to move away from SGML? If the performance is still not satisfying, please let me know, I'll co= ntinue to optimize xslt.
Beside performance issues, I can see some difference in results of 'mak= e html' and 'make xslthtml'. For example, see doc/src/sgml/html= /spi.html (xslt-generated version doesn't contain the lists of function= s).

Best regards,
Alexander

I think this is great= result=C2=A0 and it's worth to start moving to xml.
=
I think that moving to XML is step ba= ckward, because XML is ugly.
=
I want to note, that it's 21-th century=C2=A0 and we should think = about including pictures into our documentation, which will greatly improve= it.
Yeah, +1.
=
=
XML makes this easier.
And I think that Lisp is much better for this =C2= =A0puprose.

--
// = Dmitry.

--001a1146ffb469008f0523ae6c8b--