From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/116658 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Rik Kabel via ntg-context Newsgroups: gmane.comp.tex.context Subject: Re: bottlenecks Date: Sat, 17 Dec 2022 10:05:13 -0500 Message-ID: <26252e62-81be-d968-47f0-95e4e2a01740@rik.users.panix.com> References: <980e90bd-48cc-016c-b60d-6ede05fd8891@xs4all.nl> <4dd11121-7761-861a-1f4e-7ed04fb8117b@rik.users.panix.com> <2ea0d40e-b545-de4c-4b4c-4cfdc242acab@freedom.nl> <384a66cc-77fd-6463-0f8c-a8cd7742f15c@freedom.nl> Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2914577167026622120==" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1916"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Firefox/102.0 Thunderbird/102.6.0 Cc: Rik Kabel To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Sat Dec 17 16:06:03 2022 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane-mx.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1p6YlG-0000EQ-9m for gctc-ntg-context-518@m.gmane-mx.org; Sat, 17 Dec 2022 16:06:02 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id EC96F2A4D12; Sat, 17 Dec 2022 16:05:26 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Jv4cq6RLAtf9; Sat, 17 Dec 2022 16:05:24 +0100 (CET) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 894742A4D86; Sat, 17 Dec 2022 16:05:24 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 9C9262A4D85 for ; Sat, 17 Dec 2022 16:05:22 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ByYG8Xcccold for ; Sat, 17 Dec 2022 16:05:20 +0100 (CET) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=166.84.1.89; helo=mailbackend.panix.com; envelope-from=context@rik.users.panix.com; receiver= Original-Received: from mailbackend.panix.com (mailbackend.panix.com [166.84.1.89]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 95C452A4D12 for ; Sat, 17 Dec 2022 16:05:20 +0100 (CET) Original-Received: from [192.168.1.106] (cpe-69-204-136-231.nycap.res.rr.com [69.204.136.231]) by mailbackend.panix.com (Postfix) with ESMTPSA id 4NZ8R25R5Rz3nDk for ; Sat, 17 Dec 2022 10:05:18 -0500 (EST) Content-Language: en-US In-Reply-To: <384a66cc-77fd-6463-0f8c-a8cd7742f15c@freedom.nl> X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.26 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: "ntg-context" Xref: news.gmane.io gmane.comp.tex.context:116658 Archived-At: This is a multi-part message in MIME format. --===============2914577167026622120== Content-Type: multipart/alternative; boundary="------------TFm2ZcffU8FarOnOQ282PAKA" Content-Language: en-US This is a multi-part message in MIME format. --------------TFm2ZcffU8FarOnOQ282PAKA Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 2022-12-17 04:48, Hans Hagen via ntg-context wrote: > On 12/17/2022 1:05 AM, Rik Kabel via ntg-context wrote: > >> The laptop was hot stuff in 2017 with 16GB RAM, 1TB SSD, and a 4K >> touch screen -- today, not so hot. Due to be replaced next year. > > so a bit like the surface i have as spare (which was slower than the > 2013 precission that i recently replaced by a 2018 one) > >> Here are the numbers without compact fonts enabled. Not much difference. > >>     mkiv lua stats  > font engine: otf 3.131, afm 1.513, tfm 1.000, 84 >>     instances, 67 shared in backend, 3 common vectors, 64 common hashes, >>     load time 1.076 seconds > > which means that you don't run in compact mode Indeed, I had a typo. Running with compact fonts, I get: mkiv lua stats  > used config file: selfautoparent:/texmf/web2c/texmfcnf.lua mkiv lua stats  > used cache path: C:/ConTeXt_LMTX/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e mkiv lua stats  > resource resolver: loadtime 0.045 seconds, 1 scans with scantime 0.037 seconds, 0 shared scans, 37 found files, scanned paths: C:/Users/micro/texmf mkiv lua stats  > stored bytecode data: 507 modules (0.267 sec), 106 tables (0.015 sec), 613 chunks (0.282 sec) mkiv lua stats  > traced context: maxstack: 4108, freed: 2453, unreachable: 1655 mkiv lua stats  > cleaned up reserved nodes: 78 nodes, 8 lists of 438 mkiv lua stats  > node memory usage: 6860 attribute, 4602 dir, 69 fontspec, 4606 glue, 84 gluespec, 2301 glyph, 3068 hlist, 3 kern, 647 mathspec, 5 penalty, 2 temp mkiv lua stats  > node list callback tasks: 13 unique task lists, 37 instances (re)created, 87134 calls mkiv lua stats  > h-node processing time: 3.146 seconds including kernel mkiv lua stats  > inserted spaces in output: 106025 mkiv lua stats  > attribute processing time: 0.248 seconds front- and backend mkiv lua stats  > driver time: 2.425 seconds mkiv lua stats  > used backend: pdf mkiv lua stats  > jobdata time: 0.198 seconds saving, 0.059 seconds loading mkiv lua stats  > callbacks: file: 34385, saved: 191160, direct: 8, function: 173538, value: 345, message: 0, bytecode: 613, late 0, total: 400049 (1184 per page) mkiv lua stats  > randomizer: resumed with value 0.88558194690977 mkiv lua stats  > v-node processing time: 0.208 seconds mkiv lua stats  > loaded patterns: agr:gr:62 cn::58 de::3 deo:de:9 en::1 es::64 fr::63 it::66 la::67 ru::22, load time: 0.000 mkiv lua stats  > structure elements: 28148 element chains identified mkiv lua stats  > interactive elements: 3983 references, 4873 destinations mkiv lua stats  > margin data: 497 entries, 0 pending mkiv lua stats  > loaded fonts: 14 files: antykwatorunska-bold.otf, antykwatorunskacond-bold.otf, antykwatorunskacond-regular.otf, libertinusmath-regular.otf, libertinusmono-regular.otf, libertinussans-italic.otf, libertinussans-regular.otf, libertinusserif-italic.otf, libertinusserif-regular.otf, libertinusserif-semibold.otf, zentb___.otf, keteraramtsova.ttf, msjh.ttc, times.ttf *mkiv lua stats  > font engine: otf 3.131, afm 1.513, tfm 1.000, 18 instances, 2 shared in backend, 2 common vectors, 0 common hashes, load time 0.534 seconds * mkiv lua stats  > text directions: 4.229 seconds mkiv lua stats  > math tweaking time: 0.023 seconds, 2 math goodie tables mkiv lua stats  > pdf annotations: 3983 links (3983 unique), 0 special mkiv lua stats  > font embedding time: 0.055 seconds, 13 fonts mkiv lua stats  > result saved in file: misquotation_bodyonly.pdf, compresslevel 1, objectcompresslevel 3 mkiv lua stats  > positions: 4034 collected, 1723 deltas, 4025 shared partials, 111 partial entries mkiv lua stats  > used platform: win64, type: windows, binary subtree: texmf-win64 mkiv lua stats  > used engine: luametatex version: 2.1004, functionality level: 20221214, format id: 679, compiler: gcc mkiv lua stats  > tex properties: 740852 hash slots used of 2097152, 51822 control sequences, approximate memory usage: 41 MB mkiv lua stats  > lua properties: engine: lua 5.4, used memory: 225 MB, ctx: 200 MB, max: 200 MB, symbol mask: utf (τεχ) mkiv lua stats  > runtime: 19.993 seconds, 338 processed pages, 338 shipped pages, 16.906 pages/second but the overall runtime is essentially unchanged. >> I do have some macros that are likely to make you (and others who are >> more adept at such things) cringe. Happy to share more of the source >> if it is helpful. > > sure > >> I have also run with --profile and have attached that log as well as >> the complete execution log (zipped together as logs.zip). > here are a few: > > 0.613002300 s    0.138 %     0.609968531 s    0.160 %      3674 # > prerollreference > >  0.420704300 s    0.095 %     0.420702649 s    0.110 %         2 # > analyzeregister > > 0.425307400 s    0.096 %     0.425299968 s    0.111 %         9 # > action                                   1358 > ...MTX/tex/texmf-context/tex/context/base/mkxl/math-act.lmt > > 0.681407500 s    0.154 %     0.681338138 s    0.178 %        84 # > otftotfm                                  611 > ...MTX/tex/texmf-context/tex/context/base/mkxl/font-otl.lmt > > few calls, much runtime And that mean what? Does it point to something I should do differently? Is there more detailed information that I can generate for diagnostics that would help? > > Hans > > -- Rik --------------TFm2ZcffU8FarOnOQ282PAKA Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit


On 2022-12-17 04:48, Hans Hagen via ntg-context wrote:
On 12/17/2022 1:05 AM, Rik Kabel via ntg-context wrote:

The laptop was hot stuff in 2017 with 16GB RAM, 1TB SSD, and a 4K touch screen -- today, not so hot. Due to be replaced next year.

so a bit like the surface i have as spare (which was slower than the 2013 precission that i recently replaced by a 2018 one)

Here are the numbers without compact fonts enabled. Not much difference.

    mkiv lua stats  > font engine: otf 3.131, afm 1.513, tfm 1.000, 84
    instances, 67 shared in backend, 3 common vectors, 64 common hashes,
    load time 1.076 seconds

which means that you don't run in compact mode

Indeed, I had a typo. Running with compact fonts, I get:

mkiv lua stats  > used config file: selfautoparent:/texmf/web2c/texmfcnf.lua
mkiv lua stats  > used cache path: C:/ConTeXt_LMTX/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e
mkiv lua stats  > resource resolver: loadtime 0.045 seconds, 1 scans with scantime 0.037 seconds, 0 shared scans, 37 found files, scanned paths: C:/Users/micro/texmf
mkiv lua stats  > stored bytecode data: 507 modules (0.267 sec), 106 tables (0.015 sec), 613 chunks (0.282 sec)
mkiv lua stats  > traced context: maxstack: 4108, freed: 2453, unreachable: 1655
mkiv lua stats  > cleaned up reserved nodes: 78 nodes, 8 lists of 438
mkiv lua stats  > node memory usage: 6860 attribute, 4602 dir, 69 fontspec, 4606 glue, 84 gluespec, 2301 glyph, 3068 hlist, 3 kern, 647 mathspec, 5 penalty, 2 temp
mkiv lua stats  > node list callback tasks: 13 unique task lists, 37 instances (re)created, 87134 calls
mkiv lua stats  > h-node processing time: 3.146 seconds including kernel
mkiv lua stats  > inserted spaces in output: 106025
mkiv lua stats  > attribute processing time: 0.248 seconds front- and backend
mkiv lua stats  > driver time: 2.425 seconds
mkiv lua stats  > used backend: pdf
mkiv lua stats  > jobdata time: 0.198 seconds saving, 0.059 seconds loading
mkiv lua stats  > callbacks: file: 34385, saved: 191160, direct: 8, function: 173538, value: 345, message: 0, bytecode: 613, late 0, total: 400049 (1184 per page)
mkiv lua stats  > randomizer: resumed with value 0.88558194690977
mkiv lua stats  > v-node processing time: 0.208 seconds
mkiv lua stats  > loaded patterns: agr:gr:62 cn::58 de::3 deo:de:9 en::1 es::64 fr::63 it::66 la::67 ru::22, load time: 0.000
mkiv lua stats  > structure elements: 28148 element chains identified
mkiv lua stats  > interactive elements: 3983 references, 4873 destinations
mkiv lua stats  > margin data: 497 entries, 0 pending
mkiv lua stats  > loaded fonts: 14 files: antykwatorunska-bold.otf, antykwatorunskacond-bold.otf, antykwatorunskacond-regular.otf, libertinusmath-regular.otf, libertinusmono-regular.otf, libertinussans-italic.otf, libertinussans-regular.otf, libertinusserif-italic.otf, libertinusserif-regular.otf, libertinusserif-semibold.otf, zentb___.otf, keteraramtsova.ttf, msjh.ttc, times.ttf
mkiv lua stats  > font engine: otf 3.131, afm 1.513, tfm 1.000, 18 instances, 2 shared in backend, 2 common vectors, 0 common hashes, load time 0.534 seconds
mkiv lua stats  > text directions: 4.229 seconds
mkiv lua stats  > math tweaking time: 0.023 seconds, 2 math goodie tables
mkiv lua stats  > pdf annotations: 3983 links (3983 unique), 0 special
mkiv lua stats  > font embedding time: 0.055 seconds, 13 fonts
mkiv lua stats  > result saved in file: misquotation_bodyonly.pdf, compresslevel 1, objectcompresslevel 3
mkiv lua stats  > positions: 4034 collected, 1723 deltas, 4025 shared partials, 111 partial entries
mkiv lua stats  > used platform: win64, type: windows, binary subtree: texmf-win64
mkiv lua stats  > used engine: luametatex version: 2.1004, functionality level: 20221214, format id: 679, compiler: gcc
mkiv lua stats  > tex properties: 740852 hash slots used of 2097152, 51822 control sequences, approximate memory usage: 41 MB
mkiv lua stats  > lua properties: engine: lua 5.4, used memory: 225 MB, ctx: 200 MB, max: 200 MB, symbol mask: utf (τεχ)
mkiv lua stats  > runtime: 19.993 seconds, 338 processed pages, 338 shipped pages, 16.906 pages/second

but the overall runtime is essentially unchanged.

I do have some macros that are likely to make you (and others who are more adept at such things) cringe. Happy to share more of the source if it is helpful.

sure

I have also run with --profile and have attached that log as well as the complete execution log (zipped together as logs.zip).
here are a few:

0.613002300 s    0.138 %     0.609968531 s    0.160 %      3674 # prerollreference

 0.420704300 s    0.095 %     0.420702649 s    0.110 %         2 # analyzeregister

0.425307400 s    0.096 %     0.425299968 s    0.111 %         9 # action                                   1358 ...MTX/tex/texmf-context/tex/context/base/mkxl/math-act.lmt

0.681407500 s    0.154 %     0.681338138 s    0.178 %        84 # otftotfm                                  611 ...MTX/tex/texmf-context/tex/context/base/mkxl/font-otl.lmt

few calls, much runtime

And that mean what? Does it point to something I should do differently? Is there more detailed information that I can generate for diagnostics that would help?


Hans


--
Rik
--------------TFm2ZcffU8FarOnOQ282PAKA-- --===============2914577167026622120== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cHM6Ly93d3cubnRnLm5sL21haWxtYW4v bGlzdGluZm8vbnRnLWNvbnRleHQKd2VicGFnZSAgOiBodHRwczovL3d3dy5wcmFnbWEtYWRlLm5s IC8gaHR0cDovL2NvbnRleHQuYWFuaGV0Lm5ldAphcmNoaXZlICA6IGh0dHBzOi8vYml0YnVja2V0 Lm9yZy9waGcvY29udGV4dC1taXJyb3IvY29tbWl0cy8Kd2lraSAgICAgOiBodHRwczovL2NvbnRl eHRnYXJkZW4ubmV0Cl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fCg== --===============2914577167026622120==--