The amount of memory available in the SceneView to display features and terrain depends on a number of factors, such as the device, but also the specified qualityProfile. In complex scenes the SceneView may reach this memory limit. To prevent browser crashes and slow performance, it will reduce the amount of data rendered. This sample shows how to use SceneView.performanceInfo to get information about memory consumption in a scene. Such information can be useful to scene creators and application developers working with webscenes.
PerformanceInfo.totalMemory shows the total memory allocated to a SceneView. A high qualityProfile allows to use significantly more memory than medium or low. Note that especially on less powerful devices with less memory available, a higher quality profile increases the risk of running out of memory, with potential decrease in performance or even crashes.
PerformanceInfo.usedMemory shows an estimation of how much memory the SceneView is currently using. When this value approaches the totalMemory, then the Quality is reduced. This will reduce the level of detail for scene layers, lower the tile resolution for tiled layers, and reduce the number of features for feature layers.
SceneView.performanceInfo.layerPerformanceInfos contains information about memory consumption for each of the layers in the scene. displayedNumberOfFeatures gives information about how many features are currently displayed in the view. The property maximumNumberOfFeatures shows how many features could be displayed in the SceneView. The maximumNumberOfFeatures property available on FeatureLayer, CSVLayer, GeoJSONLayer and point SceneLayer can be used to override the default value and display more features even if there isn't enough memory. High values could however lead to the browser running out of memory.