New Ghostscript/GhostPDL compiler warnings - 2018-11-28-16:00:02 - f0ca2c929171a025e846a2eddd51f767e04c8e23

[email protected] Wed, 28 Nov 2018 17:22:43 -0800 (PST)
Newsgroups gmane.comp.printing.ghostscript.regression
Message-ID <20181129012243.364402040B89@i7>
Previous Revision: 34bb42a7bcd649675d618a62c9f8a3a673598787
 Current Revision: f0ca2c929171a025e846a2eddd51f767e04c8e23

commit f0ca2c929171a025e846a2eddd51f767e04c8e23
Author:     Ray Johnston <[email protected]>
AuthorDate: Wed Nov 14 16:56:43 2018 -0800
CommitDate: Wed Nov 28 13:26:33 2018 -0800

    Bug 695813. Reduce memory usage for ICC profiles. Example AIX361DC_Save.pdf
    
    The same ICC profiles and colorspace were used many times (in the example
    the cited PDF_1.7_ATS file) which could result in memory usage growth and
    performance impact associated with loading the same profile many times.
    There was a icc_profile_cache in the gstate, but it was not being used for
    ICCBased colorspaces, only for CIEBased* spaces.
    
    Adding logic to cache ICCBased colorspaces and change ICCBased space to
    be in stable memory so it can exist in the cache. This results in a
    reduction of the RAM needed for the cited file from 1.0Gb down to 44Mb
    and reduced the parse time from 29.4s down to 24.4s (overall time from
    94.5s to 91.3s) for ppmraw 600 dpi.
    
    Note that this optimization results in many fewer CS/cs operations being
    emitted by pdfwrite, but this also can result in text being emitted as
    TJ operations (glyphs with positioning) which can result in single pixel
    shifts in glyphs. Sometimes this looks better, sometimes not, but the
    reduction in size/complexity of the resulting PDF is worth it.

Resource/Init/pdf_draw.ps
base/gsicc_profilecache.c
psi/zicc.c



Ghostscript:

new scan-build warnings:

./psi/zicc.c:231:36: warning: Access to field 'hashcode' results in a dereference of a null pointer (loaded from variable 'picc_profile')
            gsicc_add_cs(igs, pcs, picc_profile->hashcode);
                                   ^~~~~~~~~~~~~~~~~~~~~~


http://miles.ghostscript.com:8080/artifex/f0ca2c929171a025e846a2eddd51f767e04c8e23/gs/index.html

http://miles.ghostscript.com:8080/artifex/f0ca2c929171a025e846a2eddd51f767e04c8e23/gs-scan-build.txt