Potentially slow GetMap response times with tiny bounding boxes

Description

It is possible for GeoServer to have very slow response times handling WMS GetMap requests against a raster layer when the requested bounding box is much smaller than the resolution of the raster data (i.e., a bounding box where maxx-minx=0.001 degrees against a 1 degree resolution source). The actual slow performance is being caused by the javax.media.jai.ROIShape.getAsImage() in the com.sun.media.jai.opimage.MosaicOpImage constructor when the imageBounds is much larger than the mapRasterArea.

This issue does not happen when advanced projection handling is enabled because the GridCoverageRenderer method that is used in that path will always crop the image that it returns to the map envelope.

Environment

None

Assignee

Unassigned

Reporter

Steve Ikeoka

Triage

None

Fix versions

Affects versions

Components

Priority

Medium
Configure