Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

investigate whether using a single instance of ghostscript for ps->png conversion can speed up the Windows build #8293

Closed
anntzer opened this issue Mar 14, 2017 · 1 comment
Milestone

Comments

@anntzer
Copy link
Contributor

anntzer commented Mar 14, 2017

Keeping a single instance of Inkscape for the svg->png conversion greatly speeds up the Windows build (#8248 (comment)).

It appears that ghostscript may similarly be opened and convert files fed on stdin one at a time. Quoting relevant portions of the man page:

gs reads "files" in sequence and executes them as Ghostscript programs. After doing this, it reads further input from the standard input stream (normally the keyboard), interpreting each line separately. The interpreter exits gracefully when it encounters the "quit" command (either in a file or from the keyboard), at end-of-file, or at an interrupt signal (such as Control-C at the keyboard).

You might want to print each page separately. To do this, send the output to a series of files "foo1.xyz, foo2.xyz, ..." using the "-sOutputFile=" switch with "%d" in a filename template:
-sOutputFile=foo%d.xyz
Each resulting file receives one page of output, and the files are numbered in sequence. "%d" is a printf format specification; you can also use a variant like "%02d".

You can also send output to standard output:
-sOutputFile=-
or
-sOutputFile=%stdout%
In this case you must also use the -q switch, to prevent Ghostscript from writing messages to standard output.

I have no idea how much (if anything) would be gained but given the results with Inkscape it may be worth looking at it to speed up the Windows build...

@anntzer
Copy link
Contributor Author

anntzer commented Sep 7, 2018

Closed by #9454.

@anntzer anntzer closed this as completed Sep 7, 2018
@QuLogic QuLogic added this to the v3.0 milestone Sep 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants