Ghostscript Threads to improve rendering speed

Post Reply
timur_davletshin
Posts: 9
Joined: Sun Mar 20, 2016 3:36 pm

Ghostscript Threads to improve rendering speed

Post by timur_davletshin » Sun Mar 27, 2016 1:17 pm

Is is possible/safe to specify Ghostscript rendering threads in TurboPrint (e.g. additional -dNumRenderingThreads) for GSZEDO or GS? I see GSCOMMANDLINE in pstoturboprint script with GS parameters. Is it what I'm looking for?

Anyway it would be great to see this functionality out of the box. For example, recent Raspberry Pi comes with quad core CPU which can improve GS rendering significantly.

zedonet
Site Admin
Posts: 1783
Joined: Fri Oct 06, 2006 8:02 am

Re: Ghostscript Threads to improve rendering speed

Post by zedonet » Tue Mar 29, 2016 9:06 am

Hello,

yes, it is possible to add the option and it should be safe. Please go ahead and add the option -dNumRenderingThreads=4 and post your results.

timur_davletshin
Posts: 9
Joined: Sun Mar 20, 2016 3:36 pm

Re: Ghostscript Threads to improve rendering speed

Post by timur_davletshin » Fri Apr 01, 2016 1:07 pm

Yes, it does work for me. It seems to be at least twice faster, which is crucial for RPi.

nortizt
Posts: 5
Joined: Mon Sep 19, 2016 8:06 am

Re: Ghostscript Threads to improve rendering speed

Post by nortizt » Thu Mar 02, 2017 4:48 pm

Hello,

I am also using a Rpi and need to improve the time it takes from when I send the printing command to when the printer starts printing. I am afraid I am a really basic Rpi user and all this "GSZEDO/GS" sounds like chinese to me :oops: .

Where should I make this modification? Is there any other way to improve the rendering time? would overclocking improve this in any way?

Thank you for your help!

zedonet
Site Admin
Posts: 1783
Joined: Fri Oct 06, 2006 8:02 am

Re: Ghostscript Threads to improve rendering speed

Post by zedonet » Fri Mar 03, 2017 2:49 pm

Hello,

the file to modify is

/usr/lib/cups/filter/pstoturboprint

and the line to modify is line 307 (TurboPrint 2.42-1, may be a different line for upcoming versions)
old:
GSCOMMANDLINE="gs -sDEVICE=$GSDRIVER -r${GSXDPI}x$GSYDPI -g${GSWIDTH}x$GSHEIGHT\

new:
GSCOMMANDLINE="gs -sDEVICE=$GSDRIVER -r${GSXDPI}x$GSYDPI -g${GSWIDTH}x$GSHEIGHT -dNumRenderingThreads=4 \

This will use all of the 4 cores of the Raspberry Pi 2 / 3 and is more efficient and safer than overclocking.

nortizt
Posts: 5
Joined: Mon Sep 19, 2016 8:06 am

Re: Ghostscript Threads to improve rendering speed

Post by nortizt » Sun Mar 05, 2017 7:07 pm

Thank you!

Post Reply