[NTG-context] bottlenecks

Hans Hagen j.hagen at freedom.nl
Fri Dec 16 23:07:33 CET 2022

On 12/16/2022 10:08 PM, Rik Kabel via ntg-context wrote:
> Hans,
> Here are the stats for a 346 page book. Fonts are all cached. 
> Compilation is via a make file which processes this as:
>     context --noconsole --overloadmode=error --batchmode --nonstopmode
>     --nosynctex misquotation_bodyonly.mkvi > nul
> and is run under W11 x64 on an i7-8550U. The only tables are contents 

ok, not the fastest i7 out there, more the tablet one, right?

> and acronyms, and such, nothing complex. No graphics. Compact fonts are 
> enabled.

can you check compact mode .. when compact fonts are not enabled, do you 
get the same

 >     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,

i wonder why so many instances

>     mkiv lua statsĀ  > node memory usage: 6869 attribute, 4608 dir, 4612
>     glue, 84 gluespec, 2304 glyph, 3072 hlist, 3 kern, 647 mathspec, 5
>     penalty, 2 temp

this is suspicious ... i fixed a dir leak recently but having 3K boxes 
dangling ...

> In neither case do the sum of the times listed in the stats come close 
> to the total runtime (in the second example, 14.774 seconds of 23.057 
> are accounted), so there are other unidentified processes involved.

these stats are an indication because below a threshold (time accuracy) 
nothing is measured

> In any case, the processing time has been improving greatly over the 
> last couple of years, and LMTX is significantly faster that MkIV in all 
> of my work.
sure, that is to be expected although it depends a bit on the use case, 
for instance the backend is slower (but does much more) so initially 
lmtx was actually slower but at some point we started gaining (and i can 
probably gain a little more)

i wonder why directions bump time because much of what tex does is sort 
of agnostic for directions (the backend needs more time but i don't see 
that in your stats)

when you run with --profile you get a much slower run but might get some 
info from the extra log


                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl

More information about the ntg-context mailing list