[gs-devel] 'null' output device?

Ray Johnston Ray.Johnston at Artifex.com
Fri Aug 31 12:48:40 PDT 2007


Jeroen,

I recommend the 'bit' family of devices, bit, bitrgb, bitcmyk
since these devices perform full rendering and can be configured
with -dGrayValues=### for 1 bit per component (the default),
2 bit, 4 bit or 8 bit using -dGrayValues of 2, 4, 16, 256
respectively.

This device has a special internal check for the OutputFile
file name being '/dev/null' or 'nul' and doesn't even make the
'fwrite' calls, thus avoiding even IO calls on the OS which can
slow down the timing on some systems.

Also the 'bit' family of devices are good because they perform no
compression of the data. This timing closely mimics the timing when
a bitmap is to be DMA'ed to a printer or is being 'displayed' directly
from a buffer.

I hope this helps.

Best Regards,
Ray Johnston
------------------------------------------------------------------------

Jeroen Janssen wrote:
> Hello,
>
> I'm going to run some tests that will result in lots of (bitmap)
> output if I save it it to disk, so
> I was wondering which device can be used to measure the 'raw'
> performance of ghostscript rendering without saving the output to disk
> (a 'null' output device?).
>
> I found the 'bounding box' device, but the source states:
>  * One way to use a bounding box device is simply to include bbox.dev in the
>  * value of DEVICE_DEVSn in the makefile.  This produces a free-standing
>  * device named 'bbox' that can be selected in the usual way (-sDEVICE=bbox)
>  * and that prints out the bounding box at each showpage or copypage without
>  * doing any drawing.
>
> And (I think) this means that the bouding box will not perform the
> actual drawing (and thus will not result in correct performance
> results).
>
> Any ideas / suggestions?
>
> Thanks in advance,
>
> Jeroen Janssen
> _______________________________________________
> gs-devel mailing list
> gs-devel at ghostscript.com
> http://www.ghostscript.com/mailman/listinfo/gs-devel
>
>   




More information about the gs-devel mailing list