Forum Bugs

Very slow rendering

cratchit
Hi, all.

I'm trying to render a PDF of Moby Dick with the attached HTML, CSS, and fonts, and this takes an incredibly long time. Given this PDF renders in ~8 seconds without the CSS file, I'm guessing that this has something to do with either the page counters, or cross-references within the file.

With the CSS:

time prince -v full_document.html -o output.pdf

prince: Loading document...
prince: loading HTML5 input: full_document.html
prince: loading document: full_document.html
prince: Applying style sheets...
prince: loading style sheet: style.css
prince: Preparing document...
prince: Converting document...
prince: used font: Cinzel, Regular
prince: used font: Gentium Plus, Regular
prince: loading hyphenation patterns: /usr/local/lib/prince/style/../hyph/hyph-en-us.pat
prince: used font: Courier New, Regular
prince: used font: Gentium Plus, Italic
prince: Resolving cross-references...
prince: loading hyphenation patterns: /usr/local/lib/prince/style/../hyph/hyph-en-us.pat
prince: Finished: success

real	19m0.789s
user	18m59.380s
sys	0m0.946s


Ugh.

Is there anything I'm doing in the CSS file that is obviously wrong?

Thanks for any input.
  1. moby_dick.zip1.8 MB
    Package contains HTML, CSS, and fonts.

Edited by cratchit

cratchit
Actually, after reading through another thread, it looks like this might be a font kerning issue. If I comment out the font-face declarations in the CSS, the render time speeds up dramatically.
mikeday
Thanks, we will take a look at this issue and see if we can speed it up.
dauwhe
Interesting. I tried running the file on my machine and got bored. Switched the .ttf fonts to .otf (Adobe Caslon and Futura) and the whole doc rendered almost sixty times faster:

real	0m21.872s
user	0m21.346s
sys	0m0.204s


Edited by dauwhe

mikeday
The issue actually seems to be unrelated to kerning, and is due to the way Prince is processing the "ccmp" feature in the OpenType substitution table in this particular font. We hope to be able to fix this.
mikeday
Today we have released Prince 9 rev 5, which includes changes to the processing of OpenType GSUB features which should make the "Cinzel" font render much faster than before. Thanks for letting us know about this issue. :)