Hi,
first off, sorry for cross posting, yet the topic is
of interest of both communities.
During the last couple of months I've been working in the
background to make the streaming renderer + shapefile
datastore work at a similar level of performance as the shapefile renderer.
The reason for that is simple, to avoid the double maintenance
the shapefile renderer code imposes on the rendering subsystem.
With the patches I've committed today (after testing them in
my checkout for a few weeks, the biggest one for longer)
the streaming renderer should have become more or less
as fast as the shapefile one in most common cases, but one,
and faster in another.
The slower case is when the shapefile to be painted is
disproportionately bigger than the area to be painted.
The shapefile renderer here uses a trick, it keeps a binary
map of the pixels where anything has already been drawn,
and any feature smaller than a pixel gets compared to it,
and not drawn at all if the pixel has been touched once
already.
This gives it a 10x speedup compared to the streaming
renderer, but at the price of breaking solid any thematic
map: if you think about a map in which there are a number
of tiny geometries to be colored according to their attributes
and, say, all the red ones are read fist, you'll just get
a red map, because the geometries with other colors just
won't be painted over the red ones.
Basically this way the shapefile renderer gives the user
a fast overview of where things are, but breaks the actual
thematic distribution.
The case in which the streaming renderer is faster instead
is mapping with multiple feature type styles to get a layering
effect: the streaming renderer will allocate multiple back buffers
and do a single scan of the data source, whilst the shapefile
renderer will scan the data source one time per feature type style
(so the streaming renderer speedup is proportional to the number
of feature type styles involved).
I would like to just drop the usage of the shapefile renderer
and move it to unsupported land before we go RC.
Opinions?
Cheers
Andrea
PS: btw, the bitmap trick of the shapefile renderer could be
implemented in the streaming renderer too, it's just more
difficult in that streaming has to deal with features
with multiple geometries.
Anyone wants that badly?
--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.