[GRASS-dev] PNG driver - slow?

Glynn Clements glynn at gclements.plus.com
Wed Apr 4 15:25:05 EDT 2007

Jachym Cepicky wrote:

> export GRASS_PNGFILE=/tmp/pokus.png
> time d.vect map=soils at PERMANENT
> real    0m0.197s
> user    0m0.166s
> sys     0m0.019s
> time d.vect map=soils at PERMANENT color=yellow fcolor=yellow cats=32 width=3
> real    0m13.767s
> user    0m13.611s
> sys     0m0.098s
> Why is the second case so slow? Is it a bug in PNG driver? What can I
> do, so it is rendered faster?

My guess is the width=3.

The "thick line" code in the PNG driver is a truly awful hack (see
store_xy() in lib/pngdriver/Draw_line.c).

Glynn Clements <glynn at gclements.plus.com>

More information about the grass-dev mailing list