Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem width loading expl3-code.tex #2268

Closed
charlyms opened this issue Nov 20, 2023 · 10 comments
Closed

Problem width loading expl3-code.tex #2268

charlyms opened this issue Nov 20, 2023 · 10 comments

Comments

@charlyms
Copy link

Hello, does anyone have an idea why latexml sometimes stucks at the point:
| Digesting > Processing > Loading > Loading > Loading > Processing > Processing definitions C:/Users/.../.../l |ernel.tds/tex/latex/l3kernel/expl3-code.tex

@dginev
Copy link
Collaborator

dginev commented Nov 20, 2023

Hi @charlyms ,

Yes, we are certainly aware of expl3 being slow. It is currently borderline unusable on texlive 2022 and older (~10 minutes per run) and completely unusable on texlive 2023 (~20 minutes of load time).

And that is on linux installations. You pay an additional slowdown penalty on Windows, which has a slower Perl interpreter.

There are 2 plans to address this in future latexml milestones:

  • one is precompiling a format file for expl3-capable LaTeX, similarly to pdflatex
  • A larger ongoing effort is entirely rewriting latexml in the Rust programming language

For now my best advice is to 1) try to avoid expl3 when possible and 2) use texlive 2021 or 2022 for optimal results.

@nschloe
Copy link

nschloe commented Nov 20, 2023

A larger ongoing effort is entirely rewriting latexml in the Rust programming language

🥳

@orbita2d
Copy link

Can you not just save built artifacts for each package to a local directory? Surely better than a 20 min build time?

@dginev
Copy link
Collaborator

dginev commented Jun 19, 2024

Can you not just save built artifacts for each package to a local directory? Surely better than a 20 min build time?

Yes, but not without making the right amount of preparatory work (see #2358 for an example of just one preliminary piece). There is merit to having a \dump-like capability in LaTeXML and @brucemiller already has a working prototype that could amortize the 20 minutes.

The 20 min build time is also a sign that LaTeX 3 support in LaTeXML is not properly tested on newer texlive versions (2023, 2024). There may be other regressions lurking there.

So the most sensible short term strategy is to "just" avoid such loads entirely for now.

@jghub
Copy link

jghub commented Jul 27, 2024

new user here (2 days...): just for completeness, this problem is still present with texlive2024 installation on my OSX machine (texlive installed via macports) so this issue could also be tagged texlive2023ff ;). and the run time really is horrendeous ...

I am an (probably) ordinary latex user and far from knowing its inner workings, so: how would one "just avoid" expl3? I have no idea what it actually does (not tried, yet, to find out...), and by which package I am using in my documents (e.g. journal article manuscripts with the journals providing prescribed templates) it is requested/included...

@dginev
Copy link
Collaborator

dginev commented Jul 28, 2024

@jghub on your question:

how would one "just avoid" expl3?

There is no productive way to avoid it entirely, if you want to depend on any actively updated texlive packages. Migrating to LaTeX 3 is very much the plan for the CTAN ecosystem, so the long-term expectation would be that tools like LaTeXML can support that kernel.

If you were a proficient user of LaTeXML who wanted to avoid the issue while using a new texlive, your option would be to add local .ltxml binding files to your project source directory, which would act as overrides to the bindings included with LaTeXML. An expl3.sty.ltxml file containing just a single line with

1;

Should act as a no-op alternative for that load. The tricky part is finding out which other packages now require expl3 support in texlives >2022, and avoiding them entirely (or creating custom bindings for them). I wouldn't recommend this approach for anything but quick testing.

And yes, as mentioned in earlier comments, we are painfully aware this is a serious problem going forward, in need of a good solution.

@jghub
Copy link

jghub commented Jul 29, 2024

thanks for these clarifications. re

An expl3.sty.ltxml file containing just a single line with

1;

Should act as a no-op alternative for that load.

I tried this (putting such a file in the top-level dir of the latex document from where I execute latexml mydoc.tex) but seemingly this has no effect: latexml still starts "infinite processing" of expl3-code.tex. did I misunderstand how to do this?

in any case, thanks again for your response. I understand that it might take time until this issue can be straightened out in a clean way.

@dginev
Copy link
Collaborator

dginev commented Jul 29, 2024

Right, keep adding such 1; files for anything else that exhibits a problem -- assuming all you want is to deactivate it completely. You'd need an expl3-code.tex.ltxml next.

@jghub
Copy link

jghub commented Jul 29, 2024

ah I see, thanks. ok, that then leads to >100 errors (and thus a fatal error...). but I've got the idea. would need to better understand the whole machinery to make sensible use of this approach I guess (as you've already indicated :)).

@dginev
Copy link
Collaborator

dginev commented Oct 14, 2024

I will close here as a duplicate to #2064 which is the first report of this problem.

The regression has not yet been solved, the current intention is to use the 0.8.9 release specifically for addressing it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants