You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
GeoJSONSource retains any data set via Map#addSource(...) or GeoJSONSource#setData in a _data member. This data is included in the serialized representation of the source, but as far as I can tell, that's unnecessary: the only thing that serialized sources are used for is style validation, which does not care about GeoJSON data.
Because the data is also passed to the worker, we are effectively doubling the memory requirements of GeoJSON sources. We could avoid creating a member variable, or set it to null after sending the data to the worker, which would eliminate this overhead.
The text was updated successfully, but these errors were encountered:
One thing we'll need to resolve is how setStyle's diff should handle GeoJSON sources. As of now, we're doing a deep equality test, which is probably not what we want (see also #4006 (comment)).
GeoJSONSource
retains any data set viaMap#addSource(...)
orGeoJSONSource#setData
in a_data
member. This data is included in theserialize
d representation of the source, but as far as I can tell, that's unnecessary: the only thing that serialized sources are used for is style validation, which does not care about GeoJSON data.Because the data is also passed to the worker, we are effectively doubling the memory requirements of GeoJSON sources. We could avoid creating a member variable, or set it to
null
after sending the data to the worker, which would eliminate this overhead.The text was updated successfully, but these errors were encountered: