You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`luatex --luaonly` runs a *lua* interpreter with relevant tex libraries
available, which avoids both the overhead of repeatedly initializing
kpathsea (the old approach, very slow on macos and windows). An
alternative approach would be to use `luatex` followed by `\directlua`
calls, but on windows it appears that one needs to use `lualatex` to get
a working interactive prompt, and just loading the latex format takes
seconds(!).
For the simple following benchmark:
```sh
python -c 'from pylab import *; mpl.use("pdf"); rcParams["text.usetex"] = True; plot(); savefig("test.pdf", backend="pdf")'
```
On a macos machine, this patch brings runtime from ~4.5s to ~2.5s.
On a windows machine, this patch brings runtime from ~6.5s to ~1.7s.
We also need to figure out how to best advertise this (do we emit a
warning suggesting to install luatex on windows and macos if luatex is
not present?).
0 commit comments