[gs-devel] Poor shading performance. (shfill)

Igor V. Melichev igor.melichev at artifex.com
Sun Apr 13 16:26:46 PDT 2003


The patch 
http://www.ghostscript.com/pipermail/gs-cvs/2003-April/003166.html
restores the shfill performance to the performance of the 
PSEUDO_RASTERIZATION=0 code.

The reason of the slowdown was the disabling of the scanline algorithm.

I've counted the number of rectangles generated with test3.eps at 72 dpi.
Here are results :

Before the patch :

PSEUDO_RASTERIZATION=0  ->  3164160 rectangles
PSEUDO_RASTERIZATION=1  -> 11560658 rectangles

After the patch :

PSEUDO_RASTERIZATION=0  ->  3164160 rectangles
PSEUDO_RASTERIZATION=1  ->  3164560 rectangles

The additional 400 rectangles are from the unequivalence
described in my recent message about the coordinate rounding.
IMO the 400 rectangles (0.0012%) are not important.

I wonder why the scanline algorithm generates 4 times lesser
number of rectangles than the trapezoid algorithm.
IMO it's a problem. But this is another story.
In any case, even 3M rectangles with -r72 is dangerously big,
and therefore the shfill to be improved.

Igor.




More information about the gs-devel mailing list