This repository has been archived by the owner on Aug 8, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
GeoJSONSource update performance #8484
Labels
Core
The cross-platform C++ core, aka mbgl
performance
Speed, stability, CPU usage, memory usage, or power usage
Comments
ivovandongen
added
Core
The cross-platform C++ core, aka mbgl
performance
Speed, stability, CPU usage, memory usage, or power usage
labels
Mar 21, 2017
Hi team, any plans to look at this in the near term? |
any updates on this? |
3 tasks
This issue has been automatically detected as stale because it has not had recent activity and will be archived. Thank you for your contributions. |
This issue has been automatically detected as stale because it has not had recent activity and will be archived. Thank you for your contributions. |
This issue has been automatically detected as stale because it has not had recent activity and will be archived. Thank you for your contributions. |
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
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:
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.
The text was updated successfully, but these errors were encountered: