[Poppler-bugs] [Bug 90596] pdftoppm: out of memory; tries to allocate huge bitmap

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Fri Feb 12 14:37:38 UTC 2016


https://bugs.freedesktop.org/show_bug.cgi?id=90596

--- Comment #1 from Thomas Freitag <Thomas.Freitag at alfa.de> ---
The huge bitmap is a tiling pattern including its repititions before it is
scaled to the resulting bitmap. This algorithm was introduced in poppler 0.17.0
and dramatically increased the speed for rendering when there is a high
repitition rate.

But in this case the tiling pattern itself is so huge, but the repitition count
in x and y direction is nearly always small, between 1 x 1 amd 2 x 2 in nearly
every of quite a lot tiling patterns.

So I give it a try to fall back to the old algorithm, where the tiling pattern
is rendered for every repitition again but directly to the resulting bitmap and
measured the time:

a) Without my changes:

time ./utils/pdftoppm -png -cropbox -r 300 90596.open/Page156.pdf output/90596

real    0m29.039s
user    0m28.395s
sys    0m0.275s  

b) Use the fallback

time ./utils/pdftoppm -png -cropbox -r 300 90596.open/Page156.pdf
output/90596-new

real    0m25.754s
user    0m25.592s
sys    0m0.170s

So it's even faster to use the fallback here.

So I create a patch where it falls back to the old algorithm if repeatX *
repeatY <= 4 and measure the time of my regression test:

a) Without changes:

Refs created in 44 minutes and 32 seconds

b) With limit and fallback:

Refs created in 41 minutes and 4 seconds

So I will upload a patch when a solution for bug 94053 will be committed.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/poppler-bugs/attachments/20160212/447bd365/attachment.html>


More information about the Poppler-bugs mailing list