Hi Hazen:

I have been testing the efficiency of text clipping for the cairo devices
for a reasonably modern libcairo (version 1.6.4) and relatively modest
2.4GHz PC, and unlike older libcairo versions it is looking good.

Here is one example:

softw...@raven> time c/x09c -dev pngcairo -drvopt text_clipping=0 -fam
-fflen 2 -o cairotest%n.png

real    0m0.391s
user    0m0.360s
sys     0m0.008s
softw...@raven> time c/x09c -dev pngcairo -drvopt text_clipping=1 -fam
-fflen 2 -o cairotest%n.png

real    0m0.485s
user    0m0.468s
sys     0m0.012s

There is a relatively large amount of text in that example (the contour
labels), and also quite a bit of graphics.  In fact it is that example that
shows (on the first page) what happens if you don't have text clipped
properly.  But the total difference in elapsed time is trivial, just 0.094
seconds.

Text clipping efficiency might conceivably make an important difference for
a large test so I did the following (in the installed examples tree) to test
that possibility:

time ./plplot-test.sh --front-end=c --device=pngcairo

with that script locally modified (or not) to use -drvopt text_clipping=1

The resulting times were

(without text clipping)
real    0m34.945s
user    0m24.478s
sys     0m0.304s

and
(with text clipping)

real    0m38.174s
user    0m27.194s
sys     0m0.280s

for a rather modest ~10 per cent change in elapsed time.

>From the text_clipping=1 efficiency demonstrated by these tests I think it
is a no-brainer to adopt text_clipping=1 by default so that correct text
clipping is guaranteed for cairo devices unless the user specifically opts
out (using -drvopt text_clipping=0).  I have changed (revision 9774) cairo.c
accordingly.

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of
Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__________________________

Linux-powered Science
__________________________

------------------------------------------------------------------------------
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to