[tex4ht] performance of tex4ht on WSL linux vs. VBox linux

Nasser M. Abbasi nma at 12000.org
Sat Nov 9 03:49:32 CET 2024


If someone has same setup as me, this might be of interest to them.

tex4ht is really slow on large files. I could never find why.

I use windows 10 as base desktop but do everything on Linux. I've
been using Virtualbox all the time.

Now I tried WSL 2.0 on windows. This is Microsoft Linux subsystem.

Installed Latest Ubuntu on it and latest texLive and did
some performance  comparison to see if tex4ht will be faster on
WSL or not  compared to VBox.

I picked a small latex file to compile (only 500 pdf pages). VBox
has 30 GB of ram and assigned 8 cores. WSL is similar.

Compiling to HMTL only on VBox gives

real 8m52.232s
user 4m18.212s
sys  0m42.791s

On WSL, same command gives

real  6m12.639s
user  3m38.296s
sys   0m7.305s

So on WSL tex4ht is about 30% faster looking at real time.

Btw, compiling using lualatex, the same file, here are the numbers.

on WSL 2.0

real    1m15.851s
user    0m11.553s
sys     0m2.668s

on VBox

real 1m49.199s
user 0m28.625s
sys  0m19.688s

So we see that tex4ht is about 6 times slower than lualatex on this
example.

So I am switching to WSL now for everything.

One day, I will get dedicated PC with Linux on it and see if
performance of text4ht will be better or not.

ps. the tex4ht command used is

make4ht --shell-escape -ulm default -a warning
         -f html5+join_colors -c nma_mathjax.cfg
         -e /mnt/g/public_html/styles/texmf/tex/latex/tex4ht_build_files/MAIN.mk4 index.tex
         'mathjax,htm,5,fn-in,notoc*,p-width,charset=utf-8,cut-fullname,nostyle' '-cunihtf -utf8'

--Nasser




More information about the tex4ht mailing list.