On 11/9/2024 3:50 AM, Michal Hoftich wrote:
Hi Nasser,


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



You should use the -m draft option instead of default if you want to speed
up the compilation. This will use only one LaTeX compilation instead of
three. The important thing is to keep the auxilary files between
compilations, to get correct links, tables and other features. Another
thing that can be slow is large math, because we use L3regexes in the
MathJax mode,  so it can be slow if it needs to process large chunks of
content.

You could run the -a debug option and watch the compilation. Does it take a
lot of time in package loading phase? You will see a lot of
(path/to/foo.4ht) in that phase. Or it stops when the document is
processing? You will see [page number] messages at this phase. It can also
stop at make4ht-lib: parse_lg process file: foo.html. Where it takes the
most time?

Best regards,
Michal


Hello Michal;

I do not think the draft option will work. How is one supposed to
know if the build is final or not when using draft option? I using
your filter main.mk which figures how many times it needs to call tex4ht.

But any way, I think the issue seems to be using virtual box. This
slows things down. My last build on larger file took 50 hrs.

I am now trying to compare timing result on same small file I used
above but directly on windows using Miktex. But I am getting some
errors using make4ht from my config. Once I figure it out and correct it,
will post timings.

For lualatex, the result is amazing.

On windows, I get 9.4 seconds for this 500 pages PDF file

------------------------------------
G:\public_html\my_notes\ODE_algorithms>lualatex
This is LuaHBTeX, Version 1.18.1 (MiKTeX 24.4)

G:\public_html\my_notes\ODE_algorithms>ptime.exe  lualatex -halt-on-error   
--shell-escape -file-line-error -interaction=batchmode index.tex

ptime 1.0 for Win32, Freeware - http://www.pc-tools.net/
Copyright(C) 2002, Jem Berkes <[email protected]>

===   lualatex -halt-on-error   --shell-escape -file-line-error 
-interaction=batchmode index.tex ===
This is LuaHBTeX, Version 1.18.1 (MiKTeX 24.4)
 system commands enabled.

Execution time: 9.421 s
------------------------------------

On a new Virtual box, 50 GB RAM, 16 core virtual box, I get 2 minutes !

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

real    1m59.668s
user    0m5.363s
sys     0m2.262s
------------------------------

This is 12 times faster!

I expect similar result hopefully when I manage to run make4ht on windows.

So the slow down seems due to using Virtual box. Since disk access seems
to be much slower than when running directly on windows.

I need to get me a new PC and install Linux directlty on it and
compare timing. I expect similar timing then as on windows directly.

I can't wait 50 hrs to make a new build each time I make a new change to latex.
And this is only on one folder.

Regards,
--Nasser

Reply via email to