Skip to content

Regression: unbounded memory growth on the worker side since v1.1.0 #8470

Closed

Description

@mourner

mapbox-gl-js version: v1.1.0
browser: Chrome

Steps to Trigger Behavior

  1. Browse a simple map (e.g. /debug), quickly zooming back and forth.
  2. Watch workers memory footprint in the "Memory" tab.

Expected Behavior

Memory fluctuates around a certain size.

Actual Behavior

Memory grows indefinitely.

Since v1.1.0, quick map browsing introduces some race condition that makes some tiles to be retain on the worker side in this.loaded object of VectorTileWorkerSource indefinitely. You can track this by setting mapboxgl.workerCount = 1, setting Map maxTileCacheSize to 1, and adding console.log(Object.keys(this.loaded).length) after this.loaded[uid] = workerTile in vector_tile_worker_source.js.

I bisected this down to #8363 @ansis — something in there introduced a race condition with worker cache clearing logic. Let's investigate further.

Activity

  1. added
    performance ⚡
    on Jul 12, 2019
  2. changed the title [-]Regression: some tiles are retained indefinitely on the worker side since v1.1.0[/-] [+]Regression: unbounded memory growth on the worker side since v1.1.0[/+] on Jul 12, 2019
  3. added 2 commits that reference this issue on Jul 12, 2019
    3dfcb34
    1fd97c9
  4. added 2 commits that reference this issue on Jul 16, 2019
    4e3a785
    60cbca5
  5. added a commit that references this issue on Jul 19, 2019
    50c1ca6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

performance ⚡release blocker ⛔

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions