People often complained that their PNG export took bloody ages. At high resolutions and with some blur it sometimes took over 10 hours. That's really not nice. However, things improved a lot during the last few months, and whenever the issue arose I pointed people at the unstable SVN builds.
It was apparently noticeable faster, but I wasn't sure how much exactly, and there were no facts to backup my claims. That's why I decided to do some benchmarks on my own. I already had the framework for this from my multi core export extension tests. So, this was pretty easy to do.
The test machine was a AMD 64 X2 4200+ with 2GB of RAM.

Used SVG: exp5.svg

Used SVG: exp5nb.svg
Without blur you can obviously render over 10 times as many pixels in the same time. But the big surprise is that 0.45.1's export time isn't even remotely linear. This exponential growth seriously starts to hurt at high resolution exports. Fortunately this was addressed - as you can see in the straight graphs of a fresh Inkscape build.
The dimensions of the SVGs were 32x32 and I used quadratic dimensions for the export. For laziness reasons I initially wanted to change only one dimension, but some quick tests had shown that wide images are a lot faster to export then square ones, and square ones were faster then tall ones. Even if the number of pixels was identical.
1024x1024 took 23.625s 32x32768 took 240.250s 32768x32 took 181.469s
1024x1024 took 4.860s 32x32768 took 16.531s 32768x32 took 1.313s
Pretty weird, isn't it? I'm not really sure what's the reason behind this, but it's something to keep in mind for very tall images. Rotating 'em by 90° might be a good idea if you want to improve the throughput of PNG export.
Comments
Ah, that's great news! It
Ah, that's great news! It took me about 30 hours to export our OOPSLA poster... :)
its cos it does it in rows...
The png export code breaks the image down then works on rows of the image, so will have to loop through it a lot more for a tall narrow image than a wide but short one.
RE: its cos it does it in rows...
would it make sense to rotate it, render it to bitmap and rotate back before pnging it?
Post new comment