lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Use GhostScript API instead of forking (issue 548030043 by address@hidde


From: jonas . hahnfeld
Subject: Use GhostScript API instead of forking (issue 548030043 by address@hidden)
Date: Thu, 30 Apr 2020 12:15:23 -0700

Reviewers: ,

Message:
This probably goes without saying, but touching such core functionality
should receive very rigid testing. I hope I got most things covered, but
especially manual feedback would be very much appreciated!

Description:
Use GhostScript API instead of forking

This is much more efficient than the current scheme when converting
many PostScript files, for example when building the documentation.
For the Notation Reference, lilypond-book now takes ~2m30s instead
of 5m to compile all snippets from the notation.tely file. Other
manuals benefit less, but still the time for 'make doc' on my system
improves by one third from around 33m to 22m.

An alternative would have been to always call gsapi_init_with_args
with the same arguments used until now. This indeed works and avoids
the overhead of forking, but the instance cannot be reused. Calling
gsapi_new_instance -> gsapi_init_with_args -> gsapi_delete_instance
for every conversion still means a lot of overhead and a prototype
suggested only a small gain compared to the previous solution.

Please review this at https://codereview.appspot.com/548030043/

Affected files (+148, -46 lines):
  M configure.ac
  M lily/GNUmakefile
  M lily/general-scheme.cc
  M scm/backend-library.scm
  M scm/lily.scm
  M scm/ps-to-png.scm





reply via email to

[Prev in Thread] Current Thread [Next in Thread]