Bug 692338

Summary: performance degradation
Product: Ghostscript Reporter: Henry Stiles <henry.stiles>
Component: GeneralAssignee: Chris Liddell (chrisl) <chris.liddell>
Status: NOTIFIED FIXED    
Severity: normal    
Priority: P2    
Version: master   
Hardware: PC   
OS: All   
Customer: 711 Word Size: ---

Description Henry Stiles 2011-07-10 18:15:51 UTC
Created attachment 7662 [details]
performance problem file

The customer reports the attached file is much slower in 9.02 vs 8.71.  I confirm.

HEAD:

time ./gs -sDEVICE=bmpmono -o /dev/null  -c '100 {(/Users/henrys/gs_timing.ps) run} repeat' > /dev/null

real	0m49.024s
user	0m47.347s
sys	0m1.667s

8.71:

time ./gs -sDEVICE=bmpmono -o /dev/null  -c '100 {(/Users/henrys/gs_timing.ps) run} repeat' > /dev/null

real	0m32.915s
user	0m30.948s
sys	0m1.666s

profiles forthcoming
Comment 1 Henry Stiles 2011-07-11 05:35:26 UTC
A significant slowdown with this commit:


git show
commit 3b3261eca08cd73ca355b28fe5125c98d411820d
Author: Chris Liddell <chris.liddell@artifex.com>
Date:   Wed Jun 22 20:05:15 2011 +0100

    Bug 692297: reinstate the proper way to release FT glyphs.
    
    FT_Glyph_Done is the correct method for freeing both bitmap and
    outline glyphs from Freetype.
    
    No cluster differences expected.


profiling indicates heavier memory usage after this commit, didn't look very closely at it though.
Comment 2 Chris Liddell (chrisl) 2011-07-12 16:33:25 UTC
Fixed in:
http://git.ghostscript.com/?p=ghostpdl.git;a=commit;h=89de03

For old code, on my machine:

time ./gs -sDEVICE=bmpmono -o /dev/null  -c '100 {(/home/cliddell/Downloads/gs_timing.ps) run} repeat' > /dev/null

gives:
real	1m1.167s
user	1m0.240s
sys	0m0.880s


And for the new code:
real	0m48.838s
user	0m48.170s
sys	0m0.630s