Bug 690945 - Memory/Resource usage with transparency
Summary: Memory/Resource usage with transparency
Status: RESOLVED DUPLICATE of bug 689805
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: Vectors (show other bugs)
Version: master
Hardware: PC Linux
: P4 normal
Assignee: Ray Johnston
URL:
Keywords: bountiable
Depends on:
Blocks:
 
Reported: 2009-11-22 18:12 UTC by Hin-Tak Leung
Modified: 2014-08-26 00:16 UTC (History)
1 user (show)

See Also:
Customer:
Word Size: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hin-Tak Leung 2009-11-22 18:12:32 UTC
4 of the pdf's tests_private/comparefiles,
Bug688778.pdf
Bug689581.pdf
Bug690379.pdf
Bug689982.pdf
either ends with /VMerror, segfault (killed by kernel oom killer?), or takes a
long time to process through pxlcolor at the default -r600. 

They all work okay with ppmraw at -r600, and also either "-r600
-dNOTRANSPARENCY" (with some rendering mistakes) or "-r72" (one or two or them
works at -r150 on my machine also).

I file this against vectors, because of the -dNOTRANSPARENCY "workaround", and
also the fact that -sDEVICE=x11/x11alpha also locks up my machine.

Note that the files have extremely large dimensions (in pt - 3000 pt is almost
42 inches, or 3.5 foot):

Bug688778.pdf   1950.54 x 2385.74  pdf 1.4
Bug689581.pdf   3003.99 x 5382     pdf 1.4
Bug690379.pdf   4535.43 x 8503.94  pdf 1.6
Bug689982.pdf - 1887.87 x 2681.57  pdf 1.5
Comment 1 Ray Johnston 2009-12-03 09:50:02 UTC
The pxl device (as well as other gdevvec devices, and x11* and display do not
use the clist device, so transparency can use large memory.

I think there is another bug about this, I'll see about combining these.
Comment 2 Ken Sharp 2009-12-04 00:51:03 UTC
I think the main culprit is pdfwrite, the bug #689805 is a place holder for a
number of issues relating to pdfwrite not using the clist when flattening
transparency.
Comment 3 Hin-Tak Leung 2009-12-04 05:03:44 UTC
I tried -K500000k -Zv and various resolutions; at least with Bug689581.pdf, it
is just allocating 4 channels on pdf_open() and then again on seeing the first
graphic object, I think, so that's 8 x width x height bytes right away.
Comment 4 Hin-Tak Leung 2014-08-26 00:16:39 UTC
The resource usage is not a problem anymore. They all works within reasonable time with x11 (just plain 'gs *.pdf' without arguments) now.

timing "gs -r600 -sDEVICE=pxlcolor -o /dev/null ..." gives

Bug688778.pdf   3:14.72
Bug689581.pdf   7:40.99
Bug689982.pdf   2:23.52
Bug690379.pdf   2:28.20

or 2 minutes to 8 minutes with maximum resident set size ~ 56MB.

This seems to fit the description of bug 689805 . Ken's suggestion of this being a duplicate is good enough for me.

There are a few rendering issues AFAIK with clist-based transparency but they are tracked elsewhere.

*** This bug has been marked as a duplicate of bug 689805 ***