[gs-bugs] [Bug 692057] Ghostscript hangs at 300 dpi

bugzilla-daemon at ghostscript.com bugzilla-daemon at ghostscript.com
Sun Jun 19 21:40:24 UTC 2011


--- Comment #5 from Ray Johnston <ray.johnston at artifex.com> 2011-06-19 21:40:22 UTC ---
The time is being spent turning a large mask (1143x4471 landscape) into
a clip list (ordered list of rectangles) which is started by 
gx_image_fill_masked_start detects that the pattern is a clist. This is so
that we don't play back the clist for each and every 'fill_masked' that happens
when the pattern is a tile.

For this landscape image 8 bit wide "swaths" of the image (full height) are
collected and then fed into the clip accumulator as 'copy_mono' calls. The
clip accumulator expects that it will be fed with y-ordered calls, so it
searches the list of rectangles from the tail back. This is fine for the
first swath that is painted with increasing y order, but for subsequent
swaths, it must search all the way back to the start of the list to insert
new rectangles. As more and more of the mask is turned into rectangles in the
clip list, this gets worse and worse, particularly since each group of
rectangles across x grows.

We need a smarter way of turning an image mask into the correct sequence of
rectangles. Ideas come to mind like collecting the list x-major (for this case)
then converting to y-major just once. or using a binary tree for the y list
and the list of rectangles in x order at each y entry.

Others may have code laying around we can apply, so I'll email tech and ask
for ideas.

Configure bugmail: http://bugs.ghostscript.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

More information about the gs-bugs mailing list