首页 / 浏览问题 / 云GIS / 问题详情
iServer10.2.1地图显示速度变慢的问题
256EXP 2024年06月07日
将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);
}

请问读取速度变慢是什么原因导致的,应该如何解决

1个回答

您好,

1、 读取速度变慢这个需要排查一下,首先在iserver上直接预览地图慢吗?看看是服务的问题还是前端调用的问题

2、之前 iServer10.1.2 版本同样的调用方式加载也比 10.2.1 快吗?

3、检查【iserver安装目录】\webapps\iserver\output文件夹下的缓存,看是否存在同名缓存导致的异常

希望能够帮助到您!
980EXP 2024年06月07日

您好,我调查了一下

1.在iServer上直接用iClient for calssic预览看不到地图,用for leaflet可以看到,但跟网页上差不多慢,在iDesktop中查看倒是正常,感觉发布到iServer上就变慢了

2.之前 iServer10.1.2 版本同样的调用方式加载比 10.2.1快,所以才会前来提问

3.【iserver安装目录】\webapps\iserver\output文件夹下的缓存并没有看到对应的东西,cache_t中能找到对应的缓存,但我不清楚这个缓存支不支持我的过滤显示方法

您好,方便远程看一下吗?可以私信我qq号
经排查,用户数据更新后未建立空间索引,重建空间索引后显示速度正常。
...