3 ms·
How is performance? Last time I checked LuaLaTeX was significantly slower than XeLaTeX was significantly slower than pdfLaTeX (on the order of 5s > 1s > 0.1s fo
by Derbasti 9y ago
How is performance? Last time I checked LuaLaTeX was significantly slower than XeLaTeX was significantly slower than pdfLaTeX (on the order of 5s > 1s > 0.1s for the same document).
- slaymaker1907 9y agoAs if LaTex wasn't slow enough already. I'm always amazed at how long it takes to generate a PDF vs how quickly a browser can render a seemingly arbitrary HTML document.
- Finnucane 9y agoThe browser doesn't care if the output looks good.
- leephillips 9y agoIndeed. You should be aware of the extensive computation that the TeX engine is doing in order to produce a typographically pleasing result - browsers do none of this.
- svat 9y agoThe book A Gentle Introduction to TeX is 97 pages long (number of pages in the output). To produce the typeset output from `gentle.tex`, on my laptop, - tex takes 0.15 seconds - pdftex takes 0.37 seconds - luatex (1.0.4) takes 0.46 seconds All of these are reasonably fast, and I think getting a full book in less than half a second is acceptable. (My browser takes longer than that to render most things.) What's the catch? This book is written in plain TeX. The slowness comes when you use LaTeX: it's not unusual to have even single-page documents that take longer for LaTeX to generate. The whole LaTeX approach is to have a package for everything, load everything you may want, providing all the features, etc — and all of this implemented in TeX macro expansion in painful and hard-to-refactor ways. This is something LuaTeX will help with actually: LuaTeX makes TeX less monolithic by providing hooks (callbacks), and many things can now be implemented in easier-to-read Lua code as hooks into the right parts of TeX's execution, rather than setting everything up at the start so that after macros are expanded the right thing happens. If there's less use of LaTeX and elaborate macros, things should get faster.
- jonsterling 9y agoFor some of my documents which use opentype fonts, the difference is by a factor of 20-30 between xelatex and lualatex.
- mpweiher 9y agoDo you have embedded graphics? My experience with many documents including a 300 page book was that (re-)encoding/compressing graphics was the bulk of the processing time (>90%). There is an easy fix: specify a lower compression setting. It defaults to the highest or close to the highest setting, which is inordinately more expensive.
- leephillips 9y agoLuaLaTeX may still be a factor of two or so slower than pdftex for some documents; this is highly document-dependent.