Forum How do I...?

--structured-log=progress spams logs and slows down generating PDF

piotrekfracek
Hey,

I'm generating PDF based on quite big HTML document (112MB).
I found that when using --structured-log=progress, I receive constant spam with current progress that does not change that fast.

Example:

rg|44
prg|44
prg|44
prg|44
prg|44
prg|44
prg|45
prg|45
prg|45
prg|45
prg|45
prg|45
prg|45
prg|45
prg|45
prg|45
prg|45
prg|45
prg|45
prg|45
prg|45
prg|45
prg|45
prg|45
prg|45
prg|45
prg|45
prg|45
prg|45
prg|45
prg|45
prg|45
prg|45
prg|45
prg|45
prg|45
prg|45
prg|45
prg|45
prg|45
prg|45
prg|45
prg|45
prg|45
prg|45
prg|45
prg|45
prg|45
prg|45
prg|45
prg|45
prg|45
prg|45


I believe that slows down the process of generating the document significantly.

Results with and without progress reporting:
- --structured-log=normal -> ~8 minutes
- --structured-log=progress -> ~40 minutes

I'm not sure if the problem is in how prince calculates the progress or in spamming output tho.

Anyway, is there a way to stop checking/reporting progress every second and instead do it every minute for example? Or maybe report every 5%. Whatever what will still give me some sense of progress being made without decreasing the performance.

Thanks!
wangp
Thanks for the report. The problem is indeed due to how the progress is being calculated, not directly due to the amount of output. Does your document contain very long tables, or something like that?
piotrekfracek
Not really tables, but we have a 2-column layout containing long divs with a border.
mikeday
We have optimised progress reporting in the Prince pre-release builds, hopefully it is much faster now!