将iServer10.1.2升级到10.2.1后,同一个地图服务的图层显示速度变的极为缓慢
原本两三秒就能读取出的图层现在变成了十几秒才有可能读取完成
将地图放大后需要的读取时间会变的更长
地图服务都是靠同一个工作空间发布的,也都没有切瓦片
另外,10.2.1的版本时不时会出现以下报错:
2024-6-3 16:19:27 - WARN - The configured limit of 1,000 object references was reached while attempting to calculate the size of the object graph. Severe performance degradation could occur if the sizing operation continues. This can be avoided by setting the CacheManger or Cache <sizeOfPolicy> elements maxDepthExceededBehavior to "abort" or adding stop points with @IgnoreSizeOf annotations. If performance degradation is NOT an issue at the configured limit, raise the limit value using the CacheManager or Cache <sizeOfPolicy> elements maxDepth attribute. For more information, see the Ehcache configuration documentation.
据说是由于数据太大请求过多导致的
过滤、显示这个图层所用的是iClient for classic,具体代码如下:
1.地图服务
roadLayer = new SuperMap.Layer.TiledDynamicRESTLayer(
"RoadMap",
roadUrl,
{
transparent: true,
cacheEnabled: true
},
{
maxResolution: "auto",
bufferImgCount: 0
//maxExtent: new SuperMap.Bounds(15382151, 4186789, 15488374, 4296731),
//projection: "EPSG:3857"
}
);
2.过滤地图服务
var setLayerStatusParameters = new SuperMap.REST.SetLayerStatusParameters({
layerStatusList: layersStatus
});
var setLayerStatusService = new SuperMap.REST.SetLayerStatusService(roadFilterUrl, {
eventListeners: { "processCompleted": setFilterLayerCompleted }
});
setLayerStatusService.processAsync(setLayerStatusParameters);
3.刷新显示对应图层
function setFilterLayerCompleted(setLayerServiceEventArgs) {
roadFilterLayer.params.layersID = setLayerServiceEventArgs.result.newResourceID;
roadFilterLayer.redraw();
roadFilterLayer.setVisibility(true);
map.setLayerIndex(map.getLayersByName("RoadFilterMap")[0], 12);
}
请问读取速度变慢是什么原因导致的,应该如何解决