LuaTeX + babel + *lots* of languages -> 10GB of RAM

Herbert Voss Herbert.Voss at fu-berlin.de
Fri Jul 18 15:00:56 CEST 2025



Am 18.07.25 um 11:29 schrieb Scott Kostyshak:
> Dear all,
>
> I've come across an issue of large RAM usage while running some
> automated tests.
>
> The RAM usage is proportional to the document, which makes it difficult
> to make an MWE. Here is a long document:
>
> https://www.dropbox.com/scl/fi/s1hs1l9ac73p83tr4achm/babel-lualatex-large-ram.tex?rlkey=z8hhz888vux3jf366uxebjo05&dl=1
>
> When I run "lualatex" on it or "dvilualatex", it uses about 10GB of RAM
> for me (and the compilation does succeed with a zero error code).
>
> If you try to reproduce, please be careful on your system if you do not
> have a lot of RAM available because it might make your system run out of
> RAM and depending on your OS and setting, could grind it to a halt.
> (on my system, it just automatically kills the offending task if there's
> not enough RAM available, but it may be different for you)
>
> Any advice on whether this is a bug? If so, should it be reported to
> LuaTeX? Babel?
>
> Note that this document isn't mine and I'm not looking for a work
> around, I just want to know if there is a bug that I should report
> somewhere. I will be happy to forget about this "issue" if there's
> nothing interesting to report.

I cannot see it. I need 3GB with lualatex. However, it is not a good
idea to use \selectlanguage if you want only change the language
for correct hyphenating. \selectlanguage changes all: hyphenrules,
naming for chapter, TOC, etc
\foreignlanguage{<language>}{...}
or  \begin{otherlanguage}{<language>}
...
\end{otherlanguage}.
makes more sense in your example.

I have up-to-date TL2025 on macOS.

Herbert


More information about the texhax mailing list.