Bug 689896

Summary: Very slow performance reading PDF file
Product: Ghostscript Reporter: Marcos H. Woehrmann <marcos.woehrmann>
Component: PDF InterpreterAssignee: Alex Cherepanov <alex>
Status: NOTIFIED FIXED    
Severity: normal    
Priority: P1    
Version: master   
Hardware: PC   
OS: Linux   
Customer: 531 Word Size: ---
Attachments: patch

Description Marcos H. Woehrmann 2008-06-14 14:16:50 UTC
The attached PDF file takes Ghostscript a very long time to process, even at low
DPI values (i.e. 42 minutes at 40 DPI).  Adobe Acrobat opens and renders the
file quickly.

The customer reported this with gs8.62, but I've duplicated it was gs8.54 and
head (r8795).

The command line I'm using for testing:

  bin/gs -r40 -sDEVICE=ppmraw -o test.ppm ./ventura_ll_rcp_june_5th_2008.pdf
Comment 1 Marcos H. Woehrmann 2008-06-14 14:17:16 UTC
Created attachment 4097 [details]
ventura_ll_rcp_june_5th_2008.pdf
Comment 2 Alex Cherepanov 2008-07-15 06:25:40 UTC
Created attachment 4222 [details]
patch

Cache the pattern instance in the PDF pattern object to prevent reprated
pattern instantiation and improve performance.

This file has one more issue. The appearance of small pattern cells, used
by the file to show color tints, depend on their placement relatively to
the device pixels. Use sufficient resolution to see all patterns. -r40 is
too small.
Comment 3 Alex Cherepanov 2008-07-15 06:29:24 UTC
The patch is committed as a rev. 8842.
Regression testing shows no differences.