Bug 688468 - excessive memory use with large softmask
Summary: excessive memory use with large softmask
Status: NOTIFIED FIXED
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: Graphics Library (show other bugs)
Version: 8.51
Hardware: All All
: P3 enhancement
Assignee: Default assignee
URL:
Keywords: bountiable
Depends on:
Blocks:
 
Reported: 2005-12-21 10:24 UTC by Ralph Giles
Modified: 2008-12-19 08:31 UTC (History)
0 users

See Also:
Customer:
Word Size: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ralph Giles 2005-12-21 10:24:22 UTC
Customer has a file with a moderate-sized jpeg (2000x2800) masked by a high
resolution (10000x14000) JBIG2 image. Implementing the soft mask uses about 300
MB  of ram.

What optimizations can be done to reduce the footprint for this process, either
downsampling or doing the composite operation in bands?
Comment 1 Ralph Giles 2005-12-21 10:25:33 UTC
Created attachment 1881 [details]
example file demonstrating the footprint issue
Comment 2 Ralph Giles 2005-12-21 10:27:38 UTC
Acrobat can display the full page using only 80 MB of ram, but that may not be
at the full 300 dpi.
Comment 3 Ralph Giles 2005-12-21 13:35:38 UTC
To follow up, 8.53 has more intelligent banding for output devices derived from
gdevprn, but I didn't see a huge difference with my own testing between HEAD and
8.51.

Ray also suggests controlling the overall memory consumption with the
-dBufferSpace= device parameter.

I can however view the file with the X11 output device on linux at 72 or 100 dpi
with < 100MB maximum allocation, and create a 300 dpi ppmraw with < 80 MB with
both 8.51 and head.
Comment 4 Ray Johnston 2006-01-04 09:44:56 UTC
80 Mb seems quite reasonable
Comment 5 Ralph Giles 2006-01-11 11:52:03 UTC
Adjusting priority. The resolution for this is to port the smarter banding logic
to non-prn devices, but we have no immediate plans to do so. Leaving this open
since others are litle to trip over the same issue.
Comment 6 Ray Johnston 2007-04-12 12:00:50 UTC
Assigning to Igor since this is similar to the 'big pattern' bug fix method that he   
is implementing using the clist (for bug 688396).   
Changing priority to 'enh' since the customer is happy for now and removing  
the customer ID since it isn't really a customer issue now.  Was customer 581. 
Comment 7 leonardo 2008-01-31 03:51:17 UTC
Returning to Support. We improved the transparency with banding. Please re-test 
with current revision. Is this a customer bug ? Which customer ?
Comment 8 Ray Johnston 2008-07-02 09:33:59 UTC
Ghostscript processes this file using a reasonable amount of RAM with the
current rev (8814). Improvements in the clist transparency code may have
fixed this.