[gs-bugs] [Bug 691914] New: gs 9 is 10 X slower than gs 8.71 with DEVICE=epswrite

bugzilla-daemon at ghostscript.com bugzilla-daemon at ghostscript.com
Fri Jan 28 03:22:37 UTC 2011


http://bugs.ghostscript.com/show_bug.cgi?id=691914

           Summary: gs 9 is 10 X slower than gs 8.71 with DEVICE=epswrite
           Product: Ghostscript
           Version: 9.00
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P4
         Component: PS Writer
        AssignedTo: ken.sharp at artifex.com
        ReportedBy: williambader at hotmail.com
         QAContact: gs-bugs at ghostscript.com
   Estimated Hours: 0.0


gs 9 is TEN times slower than gs 8.71 and generates an eps file that is almost
5 times larger.
I have a script that converts PDF files to EPS files.  It ran in an acceptable
time with gs 8.71, but it began taking too long when I updated to gs 9.  I
tracked it to some PDF files that now take much longer.  I had to revert to gs
8.71.
I have some tests with a representative PDF file.  The file is black and white,
so I think that the ICC changes shouldn't be an issue.
The time with the ppmraw device is about the same from 8.71 to 9, so I suspect
that the problem is with epswrite rather than another component of gs or how I
did the build.
When I add -r600, gs9 is almost 15 times slower than gs 8.71.  Did something
change with the way that gs writes bitmaps?
William


gs 9 is over 10 times slower converting a PDF to an EPS with epswrite, and the
resulting eps is almost five times as large.

$ /usr/bin/gs -v
GPL Ghostscript 8.71 (2010-02-10)
Copyright (C) 2010 Artifex Software, Inc.  All rights reserved.
$ /usr/local/bin/gs -v
GPL Ghostscript SVN PRE-RELEASE 9.01 (2010-09-14)
Copyright (C) 2010 Artifex Software, Inc.  All rights reserved.

$ time /usr/bin/gs -q -dBATCH -dNOPAUSE -dEPSCrop -sDEVICE=epswrite
-sOutputFile=temp0.eps 601.PDF

real    0m0.902s
user    0m0.827s
sys     0m0.074s
$ time /usr/local/bin/gs -q -dBATCH -dNOPAUSE -dEPSCrop -sDEVICE=epswrite
-sOutputFile=temp1.eps 601.PDF

real    0m11.786s
user    0m11.606s
sys     0m0.118s

$ ls -l temp0.eps temp1.eps 
-rw-rw-rw- 1 william william 10253829 Jan 28 03:39 temp0.eps
-rw-rw-rw- 1 william william 47436513 Jan 28 03:39 temp1.eps


The times are about the same with the ppmraw device.

$ time /usr/bin/gs -r600 -q -dBATCH -dNOPAUSE -dEPSCrop -sDEVICE=ppmraw
-sOutputFile=temp0.ppm 601.PDF

real    0m3.762s
user    0m1.075s
sys     0m0.510s
$ time /usr/local/bin/gs -r600 -q -dBATCH -dNOPAUSE -dEPSCrop -sDEVICE=ppmraw
-sOutputFile=temp1.ppm 601.PDF

real    0m3.725s
user    0m1.096s
sys     0m0.507s
$ ls -l temp0.ppm temp1.ppm 
-rw-rw-rw- 1 william william 261439559 Jan 28 03:54 temp0.ppm
-rw-rw-rw- 1 william william 261439575 Jan 28 03:55 temp1.ppm


For epswrite, adding -r600 makes epswrite slightly faster with gs 8.71 and
slightly slower with gs 9, so gs 9 is almost 15 times slower.

$ time /usr/bin/gs -r600 -q -dBATCH -dNOPAUSE -dEPSCrop -sDEVICE=epswrite
-sOutputFile=temp0a.eps 601.PDF

real    0m0.825s
user    0m0.754s
sys     0m0.070s
$ time /usr/local/bin/gs -r600 -q -dBATCH -dNOPAUSE -dEPSCrop -sDEVICE=epswrite
-sOutputFile=temp1a.eps 601.PDF

real    0m11.792s
user    0m11.462s
sys     0m0.156s
$ ls -l temp0a.eps temp1a.eps 
-rw-rw-rw- 1 william william  9833131 Jan 28 03:58 temp0a.eps
-rw-rw-rw- 1 william william 46612187 Jan 28 03:59 temp1a.eps


I tested with a gs9.01 pre-release, but gs9.00 has the same performance issue.

$ /usr/local/bin/gs900 -v
GPL Ghostscript  9.00 (2010-09-14)
Copyright (C) 2010 Artifex Software, Inc.  All rights reserved.
$ time /usr/local/bin/gs900 -r600 -q -dBATCH -dNOPAUSE -dEPSCrop
-sDEVICE=epswrite -sOutputFile=temp1a.eps 601.PDF

real    0m12.180s
user    0m11.831s
sys     0m0.232s


pdftops from poppler processes this file faster than gs 8.71 and produces a
smaller file, so I do not think that this PDF does anything especially
expensive.

$ pdftops -v
pdftops version 0.15.3
Copyright 2005-2010 The Poppler Developers - http://poppler.freedesktop.org
Copyright 1996-2004 Glyph & Cog, LLC
$ time pdftops -eps 601.PDF temp2.eps

real    0m0.503s
user    0m0.480s
sys     0m0.023s
$ ls -l temp2.eps 
-rw-rw-rw- 1 william william 3343585 Jan 28 04:16 temp2.eps

-- 
Configure bugmail: http://bugs.ghostscript.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the gs-bugs mailing list