[Geoserver-devel] [jira] (GEOS-5759) KML performance improvement when kmscore=0 (raster) or kmscore=100 (vector)

Philippe POUYET created ImprovementGEOS-5759
KML performance improvement when kmscore=0 (raster) or kmscore=100 (vector)

Issue Type:

ImprovementImprovement

Affects Versions:

2.3.0

Assignee:

Andrea Aime

Components:

WMS

Created:

08/Apr/13 12:57 PM

Description:

Suggested changes in KMLTransformer.java to avoid unecessary features.size() calculation (generates a ‘SELECT count(*)…’ which can cost tens of seconds on very large sets)

The idea is to invoke features.size() only when needed (case kmscore <>0 and <> 100)

(slight) changes could be the followings (in KMLTransformer.java) :

line 196

  • boolean useVector = useVectorOutput(kmscore, features.size());
  • boolean useVector = useVectorOutput(kmscore, features);
    .
    .
    .
    line 317
  • boolean useVectorOutput(int kmscore, int numFeatures) {
  • boolean useVectorOutput(int kmscore, SimpleFeatureCollection features) {
    .
    .
    .
    line 335
  • if (numFeatures > magic) {
  • if (features.size() > magic) {

that’s my 2 cents…

Environment:

geoserver 2.3.0

Project:

GeoServer

Priority:

MinorMinor

Reporter:

Philippe POUYET

This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: [http://www.atlassian.com/software/jira](http://www.atlassian.com/software/jira)