todd runstein ha scritto:
> I'm writing a simple Swing app to render Tiger files. 
> I'm using StreamingRenderer to do this.  The file is
> huge so I can't load the entire thing into memory. 
> Obviously, rendering is slow (which is to be
> expected).
>
> But here's my question:  I have the same data loaded
> into postgis being served as a WMS through GeoServer. 
> Digging down into the code, I see that GeoServer is
> also using StreamingRenderer.  The thing is, GeoServer
> tears right through the file - less than 2 seconds
> where my Swing version takes over 30 seconds.  
>
> There are several differences between these two, but
> I'm not sure which one is allowing StreamingRenderer
> tot work so much better with my GeoServer install. 
> The obvious difference is the datastore - tiger files
> verses postgis.  Another difference are the styles -
> the tiger version causes every line to be drawn while
> the postgis one uses a SLD file that causes much less
> rendering.
>
> Is the difference in performance because of the
> datastore?  
That for sure. To make sure, just try a snipped of code that loads the whole
dataset from tiger, and then from postigs, and time the two. I bet postgis
will be faster.
> Or because there is less painting going
> on?  
That's a good point as well, and will influence performance noticeably.
> Or is the postgis one passing fewer features to
> be evaluated?
When zoomed in, postgis should be a lot faster if you have a spatial index
on the geometry column, and it will load only the necessary features from
the disk.

If you have already set the optimized data loading flag in your 
streaming renderer,
i believe most of the difference is played by the data store and the 
data format.
I mean, postgis is meant for production data serving, maybe tiger is 
just meant
as a interchange format? What I do mean is, nobody would expect GML to be
fast, since it's just mean to be an open interchange format.

Cheers
Andrea Aime




_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to