Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

GeoJSONSource update performance #8484

Closed
ivovandongen opened this issue Mar 21, 2017 · 7 comments
Closed

GeoJSONSource update performance #8484

ivovandongen opened this issue Mar 21, 2017 · 7 comments
Labels
Core The cross-platform C++ core, aka mbgl performance Speed, stability, CPU usage, memory usage, or power usage

Comments

@ivovandongen
Copy link
Contributor

At the moment, updating a GeoJSONSource with a great number of features takes a long time and blocks the main thread while doing so.

Profiling the current code reveals that for a 1000 features on a Google Pixel it takes around 400ms to update the source of which most time is spent in:

  • Conversion to GeoJSONVT classes 139ms
  • Setting tile data: 266ms
    • Per tile (slowest tile here):
      • GeoJSONVTPointer#getTile: 225ms
      • total: 228ms

There is a ticket open at #6177 to allow for more granular manipulation of the GeoJSONSource's data, which would be beneficial for use cases where only a small amount of features get updated at a time.

For use cases where all the data needs to be replaced, we could consider a a-synchronous update so that at least the UI thread doesn't block while preparing the tiles. It would be important to have the make sure outstanding operations are cancelled when setting new data. It could be confusing to support this in tandem with #6177 though as changes made through one api get overridden by the other.

@yang-owl
Copy link

yang-owl commented Jun 6, 2018

Hi team, any plans to look at this in the near term?

@hurrba
Copy link

hurrba commented Jul 16, 2018

any updates on this?

@zugaldia
Copy link
Member

@yang-owl @hurrba thanks for the note - there's still no additional information on our end but we'll make sure to report back as soon as we have more information to share.

@stale
Copy link

stale bot commented Jan 17, 2019

This issue has been automatically detected as stale because it has not had recent activity and will be archived. Thank you for your contributions.

@stale stale bot closed this as completed Jan 17, 2019
@LukasPaczos LukasPaczos reopened this Jan 23, 2019
@stale stale bot removed the archived Archived because of inactivity label Jan 23, 2019
@stale stale bot added the archived Archived because of inactivity label Jul 22, 2019
@stale
Copy link

stale bot commented Jul 22, 2019

This issue has been automatically detected as stale because it has not had recent activity and will be archived. Thank you for your contributions.

@stale stale bot closed this as completed Jul 22, 2019
@LukasPaczos LukasPaczos reopened this Jul 23, 2019
@stale stale bot removed the archived Archived because of inactivity label Jul 23, 2019
@stale stale bot added the archived Archived because of inactivity label Jan 19, 2020
@stale
Copy link

stale bot commented Jan 19, 2020

This issue has been automatically detected as stale because it has not had recent activity and will be archived. Thank you for your contributions.

@stale stale bot closed this as completed Jan 19, 2020
@tobrun tobrun reopened this Jan 20, 2020
@stale stale bot removed the archived Archived because of inactivity label Jan 20, 2020
@pozdnyakov
Copy link
Contributor

GeoJSONSource does not block the main thread any more

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Core The cross-platform C++ core, aka mbgl performance Speed, stability, CPU usage, memory usage, or power usage
Projects
None yet
Development

No branches or pull requests

7 participants