Forum Bugs

Slower processing with newer Prince versions

It seems that Prince 12 now takes quite a bit longer to produce documents compared to earlier versions. I compared the new version (including the latest build) against the build 20171214 which I think is the last build which was faster. Build 20180328 was the first one which introduced the behaviour described below.

The document I'm using is a classical technical documentation with about 100 pages including a table of contents (5 pages, using target counters). The document doesn't use any of the newer Prince features, it's just a "boring" document with headings, text, tables and images and the CSS is rather simple. Only local resources are used. The tests are done on a MacBook Pro (2.6 GHz, late 2013), MacOS 10.13.6 with:
--javascript --xxe -i xml

Processing times are:

Prince 12: ~3.4 seconds
Prince 20171214: ~2.6 seconds

I tried to find a reason but I couldn't find anything with two interesting exceptions:
  • If I rename the path which contains all image resources so that Prince can't load any of them I get the following times:

    Prince 12: ~1.65 seconds
    Prince 20171214: ~1.95 seconds

    The document contains 71 RGBA PNG images, all of them are screenshots. The largest image has about 1400x1300px, the smallest is 36x36px, file sizes range between 1 KB and 500 KB.

  • Beginning with build 20180328 I always get this error message (even with an empty document):
    prince: warning: disabled parallel downloads: failed to initialise locking for OpenSSL

    openssl version -a
    LibreSSL 2.2.7
    built on: date not available
    platform: information not available
    options:  bn(64,64) rc4(ptr,int) des(idx,cisc,16,int) blowfish(idx) 
    compiler: information not available
    OPENSSLDIR: "/private/etc/ssl"

    I think this is the default OpenSSL version of MacOS.

What could be the reason for the increased processing times?

Many thanks for looking at it,
Does the document use any SVG or CSS filters? If the resources are all local then parallel downloads should not matter, but you can confirm this by passing --no-network on the command-line.
No, the document doesn't contain any SVG elements/filters nor CSS filters. Using --no-network eliminates the OpenSSL messages but the processing time remains unchanged.
Is the OpenSSL error message now "default"?
The OpenSSL error is because we were caught by surprise that MacOS switched from using SecureTransport to using LibreSSL, and we will fix that in the next maintenance release by providing two different packages for MacOS.

Based on your testing it sounds like the image loading could be responsible, are they all PNG images with no JPEG?
Sorry, my post wasn't correct, there are 4 JPEGs, not only PNGs. The size of them is about 500x600px. If I exclude them processing time goes down a bit, but only minimal, from ~3.4 seconds to ~3.3 seconds.
Would you be able to email me ( one of the large PNG files for testing?
I emailed you some sample files.
We have found the cause of this issue and it should be fixed in Prince 12.1, available now. Thanks for letting us know! :D
Sorry for being very late on this. Thanks very much for fixing it! :-)