Summary: | severe performance degradation with banding | ||
---|---|---|---|
Product: | Ghostscript | Reporter: | Henry Stiles <henry.stiles> |
Component: | Graphics Library | Assignee: | Ray Johnston <ray.johnston> |
Status: | NOTIFIED FIXED | ||
Severity: | normal | ||
Priority: | P4 | ||
Version: | 9.05 | ||
Hardware: | PC | ||
OS: | All | ||
Customer: | 460 | Word Size: | --- |
Description
Henry Stiles
2013-08-12 13:50:21 UTC
While the time _is_ longer without the -dMaxBitmap=1000000000 I do not see anything like 83 minutes mentioned in the email. What vintage machine is this? With -dMaxBitmap=1000000000 I get 31 seconds (between 4 and 6 seconds per page) If I use larger bands with -dBufferSpace=64m then it has 8 bands and takes 86 seconds, (between 13 and 15 seconds per page.) Without it I see (using -Z:) that it has 129 bands and takes between 171 and 233 seconds per page, total time = 1109 seconds. I noticed that it is using the pattern-clist, but setting -dMaxPatternBitmap=32m did not improve the performance (but was large enough to not use the pattern-clist). Changing the clist_begin_typed_image to use the default method for image interpolation: ------------------------------ if (pim->Interpolate) - pie->support.x = pie->support.y = MAX_ISCALE_SUPPORT + 1; + goto use_default; ------------------------------ reduces the run time with default clist mode to 15 seconds for page 1, and the total job completes in 83 seconds. Adding -dBufferSpace=64m completes the entire job in 35 seconds. I think I need to add code that will be smarter about using HL images in the clist when interpolating. When the clist device is "pattern-clist", then we don't what to interpolate every time we paint the pattern-clist, since the 'support' requires doing interpolation for many source image lines, and we are probably only painting a fraction of it, particularly when the band size is small. That's why the BufferSpace parameter improves this file -- less bands means fewer number of times interpolating the pattern. Testing the change to use the default image handling when the clist device is the pattern-clist device and Interpolate is true. Apparently improvements in the image interpolation has improved things so that the patch to use default image processing when an interpolated image is being processed into a pattern-clist. With current HEAD (SHA e193b5d) this takes 23.3 seconds. With the patch removed that restricts HL images to the pattern-clist, this file completes in 24.8 seconds. With bug 702099, the pattern-clist (without HL images) uses > 500Mb, and the file (a single page) takes 192 sec. Enabling HL images reduces the pattern- clist to 1.2Mb and the page completes in 36 sec. |