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

Nasser M. Abbasi nma at 12000.org
Tue Nov 19 10:13:21 CET 2024


> 
>> I will be happy to make a zip file of the above file with everything
>> needed to compile it if someone wants to try themslefs. This file
>> has some math and some images. Nothing special. This is link to the
>> actual result if you like to see it
>>
> 
> Yes, we can try it.
> 

Thanks Michal.

I've made a zip file of a medium size file I have. 3000 PDF pages.
Link at bottom.

Hopefully this will illustrate how slow tex4ht is.

On windows 10/Miktex
--------------------

LUALATEX:
=========
>ptime.exe  lualatex -halt-on-error --shell-escape -file-line-error -interaction=batchmode report.tex

This is LuaHBTeX, Version 1.18.1 (MiKTeX 24.4)
  system commands enabled.

Execution time: 93.694 s


TEX4HT draft:
=============

>ptime.exe make4ht --shell-escape -ulm draft -a warning -f html5+join_colors -c nma_mathjax.cfg report.tex "mathjax,htm,4,fn-in,notoc*,p-width,charset=utf-8,cut-fullname,nostyle" "-cunihtf -utf8"

This is LuaTeX, Version 1.18.1 (MiKTeX 24.4)
  system commands enabled.

Execution time: 1412.324 s


TEX4HT default:
===============

>ptime.exe make4ht --shell-escape -ulm default -a warning -f html5+join_colors -c nma_mathjax.cfg report.tex "mathjax,htm,4,fn-in,notoc*,p-width,charset=utf-8,cut-fullname,nostyle" "-cunihtf -utf8"

This is LuaTeX, Version 1.18.1 (MiKTeX 24.4)
  system commands enabled.
This is LuaTeX, Version 1.18.1 (MiKTeX 24.4)
  system commands enabled.
This is LuaTeX, Version 1.18.1 (MiKTeX 24.4)
  system commands enabled.

Execution time: 2361.646 s


On WSL 2.0/TexLive 2024
-----------------------

LUALATEX:
==========
time lualatex -halt-on-error --shell-escape -file-line-error -interaction=batchmode report.tex
This is LuaHBTeX, Version 1.18.0 (TeX Live 2024)
  system commands enabled.

real    1m49.970s
user    1m17.797s
sys     0m1.476s

This is 109 seconds. little slower than lualatex on windows (97 s).
But not by much.

TEX4HT draft:
=============

time make4ht --shell-escape -ulm draft -a warning -f html5+join_colors -c nma_mathjax.cfg report.tex "mathjax,htm,4,fn-in,notoc*,p-width,charset=utf-8,cut-fullname,nostyle" "-cunihtf -utf8"

real    7m40.421s
user    5m58.525s
sys     0m4.117s

This is 460 sec, compared to 1400 sec on windows. Strange why now
tex4ht is faster on WSL vs. windows. May be it depends on the file?

The zip file is self contained. There is also build.sh which has
the make4ht command to use.  The zip file has the .tex file and
my .cfg

ls -lrt
total 21332
-rwxrwxrwx 1 me me     2508 Nov 18 15:28 config.lua
-rwxrwxrwx 1 me me    17998 Nov 18 15:29 nma_mathjax.cfg
-rwxrwxrwx 1 me me      203 Nov 18 15:55 build.sh
-rwxrwxrwx 1 me me     2690 Nov 18 16:23 MAIN.mk4
-rwxrwxrwx 1 me me     3895 Nov 18 20:45 make4ht-tablerows.lua
-rwxrwxrwx 1 me me      650 Nov 19 00:19 intro_1.tex
-rwxrwxrwx 1 me me     1136 Nov 19 00:20 listing_of_CAS_systems_tested.tex
-rwxrwxrwx 1 me me      848 Nov 19 00:21 time_and_leaf_size_performance.tex
-rwxrwxrwx 1 me me     3804 Nov 19 00:22 extra_stats.tex
-rwxrwxrwx 1 me me     5931 Nov 19 00:25 intro_2.tex
-rwxrwxrwx 1 me me  7784254 Nov 19 00:56 report.tex
-rwxrwxrwx 1 me me 14002421 Nov 19 02:13 report.pdf
drwxrwxrwx 1 me me     4096 Nov 19 02:50 images

Here is a link to the above folder. Simply unzip the file
and then cd to the folder slow_tex4ht/ and run the above
make4ht command.

https://12000.org/tmp/slow_tex4ht.zip

Please let me know anyone if for some reason unable to compile
the file. It will be good to at least know why tex4ht is slow
even if it can't be fixed now.

Regards,
--Nasser


More information about the tex4ht mailing list.