2

问题

我第一次使用 JS API 开发 Web 应用程序。在测试网站的性能时,我在相对较新的硬件(例如我的 Surface Laptop 3 8GB RAM、Chrome v88)上使用得非常快,但在旧的硬件(MacBook Pro 13" 2016 8GB RAM、MacBook Pro 15" 2014 8GB RAM,Dell Inspiron 15 5000 2017 8GB RAM,均运行 Chrome v88)。

链接到正在开发的 Web 应用程序:

https://dmarkbreiter.github.io/lau-interactive/

故障排除

考虑到这些“较旧”的硬件配置不是很旧,滞后的性能令人不安。起初我认为它可能是降低应用程序速度的底图或要素服务,但是当我在 API 的开发人员页面上测试示例应用程序时,我的性能即使不是更慢也是一样的。

下面链接的示例应用程序:

https://developers.arcgis.com/javascript/latest/sample-code/featurelayer-query/ https://esri.github.io/dot-density-legend/ https://livingatlas.arcgis.com/sea-冰/

上述应用程序在我的 Surface Laptop 3 上运行良好,但在其他经过测试的硬件配置上却一瘸一拐。

更新 查看我自己的应用程序,我看到两个功能服务 (LAU_Localities_ViewSoCal_Counties) 在页面加载时有多个 GET 请求。我在Query String Parameters下面包括了其中之一:

f: pbf
geometry: {"spatialReference":{"latestWkid":3857,"wkid":102100},"xmin":-13149614.849954996,"ymin":3757032.814274987,"xmax":-12993071.816026995,"ymax":3913575.8482029866}
maxRecordCountFactor: 3
resultOffset: 0
resultRecordCount: 8000
where: 1=1
orderByFields: OBJECTID ASC
outFields: OBJECTID
outSR: 102100
quantizationParameters: {"extent":{"spatialReference":{"latestWkid":3857,"wkid":102100},"xmin":-13149614.849954996,"ymin":3757032.814274987,"xmax":-12993071.816026995,"ymax":3913575.8482029866},"mode":"view","originPosition":"upperLeft","tolerance":305.74811314062526}
resultType: tile
spatialRel: esriSpatialRelIntersects
geometryType: esriGeometryEnvelope
inSR: 102100

让我感到奇怪的第一件事是maxRecordCountFactor3 的低点。

问题

这是使用 API 构建的 Web 应用程序的预期行为/性能吗?

如果没有,我怎样才能使我的应用程序在各种硬件配置上性能更高?在这个硬件上,即使在底图周围平移也会感觉和看起来很不稳定。这是一个已知问题吗?如果是,是否有任何解决方法来确保在各种硬件上的可用性能?

4

1 回答 1

3

似乎问题出在 Esri 的 WebGl 引擎上,并且无法与机器的图形驱动程序一起使用,以下基于Chrome 的浏览器上的控制台警告证明了这一点:

[esri.views.2d.engine.webgl.WebGLDriverTest] A problem was detected with your graphics driver. Your driver does not appear to honor sampler precision specifiers, which may result in rendering issues due to numerical instability. We recommend ensuring that your drivers have been updated to the latest version. Applying lowp sampler workaround. [0.0.0.0]

当问题中链接的网络应用程序在 FireFox 86 上进行测试时,它们运行得非常好,并且没有上述警告。

于 2021-03-05T19:24:55.583 回答