[tex4ht] "page is empty" messages. But nothing seems wrong in the HTML
Nasser M. Abbasi
nma at 12000.org
Fri Apr 6 02:02:49 CEST 2018
On 4/5/2018 5:05 PM, Karl Berry wrote:
> Hi Nasser,
>
> The above phase of the compile is the one that takes for ever.
>
> I'm not surprised that running dvisvgm on a 13000+ page DVI file (even
> if many pages are empty) takes a long time. Let's see, 5515 seconds
> means it's doing better than a page in a half-second, it just adds up to
> 90+ minutes in total :(.
>
> The best way forward I can think of is if you can grab the DVI file
> which is being given to dvisvgm. Then we could show it to Martin G
> (dvisvgm author) and see if he can suggest any way to speed it up.
>
> Also, once the input to dvisvgm is available, dvisvgm could be run under
> a profiler to discern if there is some "inner loop" that can be
> optimized.
>
> Also, you're on cygwin, right? I wonder if the cygwin layer over Windows
> is adding to I/O access times; I/O is almost surely a big part of the
> time being taken. Just writing 13000+ files probably takes a while.
> If we can try running the input on gnu/linux or other envs, we could
> know if that's an issue ... --best, karl.
>
Hello Karl;
Yes, I am on cygwin now. Using TL. I find it little
faster than Linux in VBox, due to IO. But it still
too slow for dvisvgm phase of the compile.
I've spend time to make a case example as you suggested.
I've picked one typical folder from my tree, and put it in a
zip file. The folder is all self contained.
The folder contains one Latex file, the .cfg file I use,
and main.mk file also. And also the dvi and idv files from
the last build. But these files can be re-generated and
anyone can see this slow issue by simply unzipping the
file, which will create a folder called
slow_svg_example/
cd to the above folder and issue the command
make4ht --lua -u -c ./nma.cfg -e ./main.mk4 report.tex "htm,3,pic-align,notoc*"
Now you might want to go have a nice long lunch or dinner
and come back in 2 hrs or so, and it might still be compiling
this one file.
The above will re-create the idv and dvi files.
The slow down starts after where it says
Make4ht: dvisvgm -n etc...
as follows
---------
Entering report.lg
Entering report.css
Entering report.tmp
Make4ht: dvisvgm -n --exact -c 1.225,1.225 -p 1- report.idv
pre-processing DVI file (format version 2)
..... << How to speed up this phase? >>
-------------------
I am sure if one runs this on a native Linux (not in VBox or cygwin),
the IO will be faster. But do not know by how much. Will it
cut the time from 2 hrs down to few minutes? Or to just one hr
for example?
lualatex compiles this file in less than one minute on cygwin.
I can't build on windows itself, since all my scripts and makefiles
are for a Linux environment. So my only choices are either use
VBox or cygwin.
The zip file is in this folder on my web page (it is only 23 MB)
https://www.12000.org/tmp/slow_svg/
Any problems compiling it, please let me know and will fix
whatever is missing. I made sure it is self contained and
does not needed anything outside of the folder.
Thank you,
--Nasser
More information about the tex4ht
mailing list