On 05/08/2026 09:13, Max Chernoff via ntg-context wrote:
Hi Vit, Hans,
On Tue, 2026-08-04 at 10:45 +0000, [email protected] wrote:
Cross-format modules like the Markdown package for TeX often benefit
from using expl3 instead of TeX,
The fundamental problems here are that:
1. expl3 is relatively slow to load from scratch.
2. expl3 is not preloaded into the ConTeXt format.
I don't think that there's anything that can be done about (1), since
expl3 isn't slow because it's bloated or poorly-written, but because it
offers so much functionality. So unless expl3 loses functionality
somehow, there's probably no way to fix this. But the expl3 load times
in ConTeXt are _so_ much better since Joseph reimplemented the Unicode
table stuff in Lua, so maybe there are some other similar places that
can be sped up.
Marcel did that :-)
The change was how we parse the Unicode data files: in classical
engines, we have no option but to do it in macros and store as
\fontdimen data. With Lua available, parsing into some tables is doable
from the Lua side. (This is for data that is not stored by the engine
itself, so for example case changing data split out from
\lccode/\uccode, as these are also needed for hyphenation control, and
that can't be managed at the macro level.)
I don't think the same gains are available elsewhere. For me, loading
expl3 into ConTeXt or plain LuaTeX takes <1 s nowadays.
I don't think that there's anything to be done about (2) either: Hans
has been focusing on reducing format build times, and adding expl3 would
slow that down again; hardly any ConTeXt packages use expl3, so there's
not much benefit to adding it; and expl3 conflicts with a few ConTeXt
features and is occasionally broken, so adding it to the ConTeXt format
might break things for non-expl3 users too.
It's not just ConTeXt, of course: any change in data loading would also
need to be done for plain, OpTeX, etc., and the probability of agreement
is very low. (We use the same data loading code in LaTeX and other
formats, it's just that in LaTeX that's done in format-building and
dumped. We really don't want multiple code paths.)
Joseph
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : [email protected] /
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
___________________________________________________________________________________