Bug 689722 - extreme slow rendering of PDF with patterns
Summary: extreme slow rendering of PDF with patterns
Status: NOTIFIED FIXED
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: PDF Interpreter (show other bugs)
Version: 8.60
Hardware: PC All
: P2 normal
Assignee: Marcos H. Woehrmann
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-02-26 06:52 UTC by artifex
Modified: 2009-04-30 06:05 UTC (History)
0 users

See Also:
Customer: 870
Word Size: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description artifex 2008-02-26 06:52:06 UTC
the attached PDF-file contains some circles filled with patterns. The rendering
of this PDF is very very slow. You have to wait a long time before you can see
first elements of the circle.
Comment 1 artifex 2008-02-26 06:53:28 UTC
Created attachment 3818 [details]
very slow rendering of PDF with patterns
Comment 2 Marcos H. Woehrmann 2008-02-26 08:34:28 UTC
I've been able to duplicate this with gs8.61 and gshead (r8548).  It takes so
long for Ghostscript to draw the venn diagram that I gave up after 5 minutes of
100% cpu usage; Acrobat Reader draws in a few seconds.   

The command line I used:

  bin/gs 689722.pdf
Comment 3 Alex Cherepanov 2008-02-26 09:11:39 UTC
The file has about 74000 image masks that render a pattern that has an image.
Even after commenting out all patterns the file is still slow.
Comment 4 Ray Johnston 2008-02-26 09:59:49 UTC
Setting customer priority
Comment 5 leonardo 2008-04-24 23:08:09 UTC
I observe a PDF interpreter problem, which needs to be fixed first. When I run :

gswin32.exe -r72 -dNOPAUSE -dBATCH -sDEVICE=ppmraw -sOutputFile=cur.ppm 
attachment.pdf

I see (using C debugger) that zbuildpattern1 is called hundreds times and the 
garbager starts too frequently. Since the PDF file contains only 6 patterns, I 
conclude that each one is being instantiated multiple times. Need to implement 
a pattern cacxhe in the PDF interpreter. Passing to Alex who owns the PDF 
interpreter.
Comment 6 Alex Cherepanov 2008-06-05 21:10:12 UTC
Probably, the best fix would be a working form cache which reduce not
only the pattern instantiation but also image rendering time.
Comment 7 Alex Cherepanov 2008-07-16 23:37:04 UTC
Rev. 8842 improves the performance from 'extremely slow' to just slow.
The sample file takes about 3 min to render on the screen vs. 1 min on
Acrobat Reader 5.
Comment 8 Henry Stiles 2008-12-16 10:29:25 UTC
back to marcos for customer notification see comment #7.  we don't know if a new
bug should be opened for comment #5.