GeoServer

FeatureWrapper performance and memory usage improvements

Details

  • Type: Improvement Improvement
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.6.2
  • Fix Version/s: 1.6.3
  • Component/s: None
  • Labels:
    None
  • Number of attachments :
    0

Description

FeatureWrapper should be recoded to lazily extract attributes from features, on a need basis, to allow for better performance and lower memory usage.
See also:
http://www.nabble.com/We-probably-need-to-rethink-Feature-wrapping-for-freemarker-templates--td16152825.html

Activity

Hide
Gabriel Roldán added a comment - - edited

Changed FeatureWrapper to lazily build the Map structures used to adapt a Feature for template usage. With the test dataset being used to conduct the improvements, the result is a gain in double performance and almost 1/3 the minimum VM heap size needed to convert to KML without going out of memory.

The following table shows the result of running the command bellow 4 times over both the new code and the old code:

..............new code(94m)....... old code(256m)
run 1............14 (s)........................26(s)
run 2 ...........13 (s)........................24(s)
run 3............12 (s)........................24(s)
run 4............12 (s)........................24(s)

Command used:
curl "http://localhost:8080/geoserver/wms?bbox=-122.52349763716758,37.700671212846714,-122.34787834609817,37.8183048910757&
styles=&Format=application/vnd.google-earth.kml+XML&request=GetMap&version=1.1.1&layers=sf:planning_zoning&
width=800&height=502&srs=EPSG:4326&KMScore=50&KMAttr=true&legend=false" > /dev/null

Show
Gabriel Roldán added a comment - - edited Changed FeatureWrapper to lazily build the Map structures used to adapt a Feature for template usage. With the test dataset being used to conduct the improvements, the result is a gain in double performance and almost 1/3 the minimum VM heap size needed to convert to KML without going out of memory. The following table shows the result of running the command bellow 4 times over both the new code and the old code: ..............new code(94m)....... old code(256m) run 1............14 (s)........................26(s) run 2 ...........13 (s)........................24(s) run 3............12 (s)........................24(s) run 4............12 (s)........................24(s) Command used: curl "http://localhost:8080/geoserver/wms?bbox=-122.52349763716758,37.700671212846714,-122.34787834609817,37.8183048910757& styles=&Format=application/vnd.google-earth.kml+XML&request=GetMap&version=1.1.1&layers=sf:planning_zoning& width=800&height=502&srs=EPSG:4326&KMScore=50&KMAttr=true&legend=false" > /dev/null

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: