[Geoserver-devel] [jira] Created: (GEOS-900) Preview page forces data envelope recomputation

Preview page forces data envelope recomputation
-----------------------------------------------

                 Key: GEOS-900
                 URL: http://jira.codehaus.org/browse/GEOS-900
             Project: GeoServer
          Issue Type: Improvement
    Affects Versions: 1.5.0-beta2, 1.4.0
            Reporter: Andrea Aime
         Assigned To: Andrea Aime
            Priority: Minor
             Fix For: 1.5.0, 1.6.0

Building the map preview page forces each datastore to recompute its envelope from data instead of using the one declared in the FeatureTypeInfo object.
This is bad, since some envelope computation may take minutes to complete (it does whe using sigma dataset, even with my RAID0 disks). We better use the cached one, and if the crs is not lat/lon, back-project the lat/lon envelope to the native CRS.

To give you an idea of how bad this can be, see this log:

140110 [FINE] org.geotools.data.postgis.PostgisFeatureStore - SQL: SELECT AsText(force_2d(Envelope(Extent("gen_full")))) FROM "public"."roads" WHERE TRUE
278891 [FINE] org.geotools.data.postgis.PostgisFeatureStore - SQL: SELECT AsText(force_2d(Envelope(Extent("gen_1")))) FROM "public"."roads" WHERE TRUE
438985 [FINE] org.geotools.data.jdbc.ConnectionPool$ConnectionListManager - Connection closed - adding to available connections.

140 seconds to compute the first envelope, 180 to compute the second!!!

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira