[gs-bugs] [Bug 690575] PS to PDF Conversion extremely slow (possibly endless)

bugzilla-daemon at ghostscript.com bugzilla-daemon at ghostscript.com
Tue Sep 14 08:11:39 UTC 2010


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

Ken Sharp <ken.sharp at artifex.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED

--- Comment #26 from Ken Sharp <ken.sharp at artifex.com> 2010-09-14 08:11:32 UTC ---
I've had a look at the performance issue. Partly its simply the fact that all
the fonts are converted to type 3 fonts, and type 3 fonts are always slow
because of the way that the CharProcs are captured.

However, I did find that the way we compare a new CharProc to all the existing
ones is unreasonably slow, as it involves seeking through a file and reading
the stored data. We do this for every stored CharProc against every new
CharProc, and we do it twice.

Profiling the code showed that it was spending something like 75% of the time
waiting for I/O operations to complete.

Revision 11717:

http://ghostscript.com/pipermail/gs-cvs/2010-September/011736.html

tackles this by creating an md5 hash as the data is written and where possible
comparing md5 hashes rather than re-reading the data continuously. For me this
improves the performance considerably, a factor of 2-3 times faster. Profiling
the code now does not show any glaring problems. Much of the time is now spent
in compressing and writing the final PDF file. Type 3 fonts are still
unavoidably slow, but at least they are better.

-- 
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