Some background: we are running GeoServer 2.7.2 and the map client is sending
WMS GetMap requests for PNG output with transparent=TRUE against raster data
using a simple ColorMap SLD and both tiled and non-tiled requests have been
tested.
We've noticed that the response time increases significantly when the map is
zoomed in far enough that the size of the bounding box in the GetMap request
is smaller than the resolution of a grid point in the original raster data
(e.g., a request with maxx-minx and maxy-miny is 0.01 degrees against a 1
degree resolution grid). In our case, the response time can jump from
<100ms to almost 5 seconds.
After doing some profiling and debugging, we were able to track the slow
performance down to the Mosaic operation at the end of
org.geoserver.wms.map.RenderedImageMapOutputFormat.directRasterRender. I've
looked at the code and I think that the ROI may not be set up correctly for
cases where the Mosaic operation has to crop the image. The following
change results in more reasonable response times for these requests:
replace this:
ROI rois = new ROI { new ROIShape(imageBounds) };
with this:
Rectangle roi = imageBounds.contains(mapRasterArea) ? mapRasterArea :
imageBounds;
ROI rois = new ROI { new ROIShape(roi) };
Using imageBounds.intersection(mapRasterArea) may also work.
I've been able to reproduce this using the sample GeoTIFF image
src/main/src/test/java/org/geoserver/data/test/world.tiff (a ColorMap SLD
must be used). I've only done some testing on 2.7.x but this appears to be
applicable to 2.8.x and master. Any thoughts?
Steve Ikeoka
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Potentially-Slow-Mosaic-Performance-in-directRasterRender-tp5241258.html
Sent from the GeoServer - User mailing list archive at Nabble.com.