Skip to content
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

Browse page performance #454

Open
1 of 2 tasks
dabreegster opened this issue Jan 29, 2024 · 4 comments
Open
1 of 2 tasks

Browse page performance #454

dabreegster opened this issue Jan 29, 2024 · 4 comments

Comments

@dabreegster
Copy link
Contributor

dabreegster commented Jan 29, 2024

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 the Filters component, and because filtersUpdated gets called once upon creation.
@dabreegster
Copy link
Contributor Author

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:

  • filtering on feature-state isn't supported
  • we can set opacity to 0 based on feature state, but clicking/hovering still picks up the hidden features, so this doesn't work

So...

@dabreegster
Copy link
Contributor Author

  • When typing free text in the filters, debounce requests. Or just update once the element loses focus

@dabreegster
Copy link
Contributor Author

dabreegster commented Jan 29, 2024

Oh yeah, and

  • gzip the .gj file. If we make sure our GAE proxy sends the gzip header correctly, the browser will gunzip for us

@dabreegster
Copy link
Contributor Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant