TileLayer perfomance issue
See original GitHub issueHi, I found a strange performance issue - I added a TileLayer to the SceneView and started zooming in and out. In my Chrome’s performance monitor DOM nodes began to increase, and the garbage collector not removing them - only a small part of them.
Description
I used jsapi-resources demo page, and that’s my code for adding a layer to the SceneView:
import "./config";
import TileLayer from "esri/layers/TileLayer";
import ArcGISMap from "esri/Map";
import SceneView from "esri/views/SceneView";
const map = new ArcGISMap();
const view = new SceneView({
map,
container: "app",
extent: {
spatialReference: {
wkid: 102100
},
xmax: -13581772,
xmin: -13584170,
ymax: 4436367,
ymin: 4435053
}
});
const tileLayer = new TileLayer({url: 'https://sampleserver6.arcgisonline.com/arcgis/rest/services/World_Street_Map/MapServer'});
map.add(tileLayer);
Expected Behavior
Garbage collector should remove the DOM nodes which are not using anymore.
Actual Behavior
The amount of DOM nodes increases while using a map-based app for a long time. I added only a small part of the video - I zoomed in for a minute, or so, and the amount of DOM nodes increased from ~100 to 7,000. The garbage collector removed only a small part from this amount.
Steps to Reproduce
- Create Map and SceneView
- Add TileLayer to the Map
- Start to zoom in and out
- Open the performance monitor and watch the amount of DOM nodes and JS event listeners
Context
We noticed a lack of performance when the users of our app using it for a long time.
Your Environment
- Version used: 4.13
- Browser Name and version: Google Chrome version 78.0.3904.70 (Official Build) (64-bit)
- Operating System and version (desktop or mobile): Desktop, Windows 10
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (5 by maintainers)
Top GitHub Comments
Thanks for your work, tiles working perfectly now!
Thank you a lot, I’ll test it as soon as it will be published at the github page