Open dabreegster opened 7 months ago
When we update filters, we're modifying a per-feature property, which forces maplibre to reprocess all the GJ data. I tried using feature state, but:
So...
Oh yeah, and
Also tried out updateData; it'll get us a little bit of a win, but I have to make sure line endpoints have unique IDs. https://osmus.slack.com/archives/C01G3D28DAB/p1706714321758859 for notes / benchmark results
Loading 18MB of scheme data and filtering is still reasonably fast (a few seconds), but lag is noticeable. I did a little bit of profiling and have some ideas for improvements. I don't think any of this is important to do yet, but wanted to record these notes somewhere.
addLineStringEndpoints
takes 650-850ms. We're making a full defensive deep-copy unnecessarily, could improve this.addLineStringEndpoints
is called twice when loading a file, because we lazily instantiate theFilters
component, and becausefiltersUpdated
gets called once upon creation.