On 7/25/2025 5:03 AM, Max Chernoff via ntg-context wrote:
Hi Hans,
TeX Live contains ~31 times as many files as the ConTeXt distribution,
so running "mtxrun --generate" is relatively slow. However, TeX Live
already generates a filename index for all its files, so if we use that
instead of traversing the filesystem, "mtxrun --generate" runs quite a
bit quicker. My testing shows that currently "mtxrun --generate" takes
2.7 seconds to run, and with this patch it takes 1.5 seconds; real-world
results will likely show an even greater difference since I tested it
with repeated runs (so the OS has cached everything) and I have really
fast disks.
I've included a diff inline below, and I've also attached the modified
files. I didn't attach mtxrun.lua since the file is so large, so you'll
need to manually copy the changes from the diff.
I don't see the advantage of adding more code just for this purpose and
even hard coding 'texlive' checks. On a tex live install that takes ages
itself one 1 seconds doesn't save much. I've actually been thinking of
filtering: only add files to the database that matter for context which
leaves out complete subtrees. The file database isn't generated that
often, it's access during a run that matters more.
Also, can you please rename m-texlive.mkxl to m-texlive.mkiv? LuaTeX
doesn't find the file with the ".mkxl" suffix, and I'd like to keep
supporting MkIV in TeX Live.
hm, i'll make a copy then (i tend to keep mkiv and mkxl separate as they
can differ eventually, in fact there are still .lua files that will go
.lmt because eventually mkiv will be like mkii: frozen)
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : ntg-context@ntg.nl /
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___________________________________________________________________________________