Discussion:
[Dvipng] sleeping --follow
Benito van der Zander
2012-05-31 17:14:12 UTC
Permalink
Hi,
reading the documentation you would think that you can use the --follow
option to speed up a tex->png conversion,
because you can run latex and dvipng in parallel.
Unfortunately, it becomes much slower, because for most small documents
latex runs in less than a second, but
dvipng sleeps for 1s, if the dvi-file is not complete.

So, I suggest that it does something like this:

1. for the first 16 ms, dvipng shouldn't sleep at all, but try to read
continuously from the file

2. afterwards sleep for 1 ms, then for 4 ms, 9, 16, ... up to a maximum
of 1024 ms

3. once a character has been read and processed, it should go back to
step 1, if the file is still not complete.


Benito
Jan-Åke Larsson
2012-06-05 05:57:43 UTC
Permalink
Post by Benito van der Zander
Hi,
reading the documentation you would think that you can use the --follow
option to speed up a tex->png conversion,
because you can run latex and dvipng in parallel.
Unfortunately, it becomes much slower, because for most small documents
latex runs in less than a second, but
dvipng sleeps for 1s, if the dvi-file is not complete.
Yes, that delay is from the stone age.
Post by Benito van der Zander
1. for the first 16 ms, dvipng shouldn't sleep at all, but try to read
continuously from the file
2. afterwards sleep for 1 ms, then for 4 ms, 9, 16, ... up to a maximum
of 1024 ms
3. once a character has been read and processed, it should go back to
step 1, if the file is still not complete.
I'll see what I can do.

/JÅ

Loading...