CesiumGS / CesiumGS/cesium

can't free memory used by loading GeoJsonDataSource, even when not added to viewer

Open
#9,058 11 comments 1 reaction 0 assignees View on GitHub
category - data sources category - memory/performance category - vector data type - bug
Dominant language
JavaScript
Stars
15.7k
Forks
3.9k
Avg merge
4d 6h
Merged PRs (30d)
34

Description

When calling GeoJsonDataSource.load multiple times the memory usage continues to rise and never goes back down, even when the datasource is never added to the viewer, no entities are created/shown and there is no way to 'unload' the datasource.

My use case is increasing polygon resolution as the user zooms in, and decreasing when not visible on the screen or zoomed out. Once the higher resolution is loaded the increased memory usage never goes down again.

Sandcastle example:
I can't really provide a sandcastle example because this requires loading external geojson files from somewhere.

Browser:
Chrome Version 84.0.4147.89
Operating System:
Windows 10.0.18362 Build 18362

Contributor guide

Open the contributing guide

Research direction

Start by reproducing repeated GeoJsonDataSource.load calls with external GeoJSON files, as described in the issue, and inspect the datasource lifecycle when it is never added to a viewer. Determine how unused loaded data can be released or unloaded. Done means repeated loading no longer causes unrecoverable memory growth after the data is no longer needed.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.