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

Michal Hoftich michal.h21 at gmail.com
Mon Nov 18 09:42:51 CET 2024


Hi Nasser,



> Yes, I did. This was in my first email:
>
> WSL is little faster as you see, by about 30%, but both still
> slow compared to lualatex.
>
>
Ah, I forgot :)

Anyway, TeX4ht will always be much slower than normal LaTeX because it
needs to load all .4ht files. It gets slower with every package you use.
Processing of the document contents shouldn't be much slower, but as you
use MathJax and large math environments, it can be slower because of the
l3regex post-processing of math. And of course, the compilation can be
executed multiple times, so all of this multiplies.

It is also possible that tex4ht is not optimised for windows like
> lualatex is?
>
>
TeX4ht depends on loading of lot of files, so this can be an issue. One
problem is that files that fill configuration hooks, like html4.4ht, are
loaded several times. For each package, we need to load them again.

But tex4ht is really slow for large files. This is a big problem
> and I wish someone could find out where this slowness comes from. My
> guess is that it is from dvilualatex because when make4ht is running
> I see this most of the time in output of top command on linux.
>
>
This is why I said to take a look at the debug output. You will see if most
of the time is spent loading .4ht files or processing pages.



> 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.

Best,
Michal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://tug.org/pipermail/tex4ht/attachments/20241118/977208aa/attachment.htm>


More information about the tex4ht mailing list.