-
Notifications
You must be signed in to change notification settings - Fork 319
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Keep sources in memory #928
Comments
@Guardiola31337 maybe this can be part of refactoring |
The idea here is to keep sources/layers in memory and reload them when a new style has been loaded (map change event). |
Any solution for this freeze? Happens with me when starting a navigation. |
Hey @rishabhsri20, this ticket is "next up" for our pipeline of work - stay tuned for updates as we update this ticket once work begins. Thank you for your patience! |
@LukasPaczos I recall having a brief discussion about this during #1387 - we would get some performance wins by not using the |
@danesfeder since v7.0.0 this is optimised under the hood, if you can @Nullable
public Source getSource(String id) {
validateState("getSource");
Source source = sources.get(id);
if (source == null) {
source = nativeMapView.getSource(id);
}
return source;
} Don't think this issue is actionable anymore. |
When looking into mapbox/mapbox-gl-native#11843. I'm noticing the following in MapUtils:
With every update we are getting the source from MapboxMap, this is an expensive task which requires to go through JNI to C++ an back. Instead of creating new instances with getSourceAs we should cache the value of the source.
The text was updated successfully, but these errors were encountered: