Summary: | extreme slow rendering of PDF with patterns | ||
---|---|---|---|
Product: | Ghostscript | Reporter: | artifex |
Component: | PDF Interpreter | Assignee: | Marcos H. Woehrmann <marcos.woehrmann> |
Status: | NOTIFIED FIXED | ||
Severity: | normal | ||
Priority: | P2 | ||
Version: | 8.60 | ||
Hardware: | PC | ||
OS: | All | ||
Customer: | 870 | Word Size: | --- |
Description
artifex
2008-02-26 06:52:06 UTC
Created attachment 3818 [details]
very slow rendering of PDF with patterns
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 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. Setting customer priority 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. Probably, the best fix would be a working form cache which reduce not only the pattern instantiation but also image rendering time. 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. back to marcos for customer notification see comment #7. we don't know if a new bug should be opened for comment #5. |