-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
fix tile caching #221
Comments
Grabbing this |
@gundersen the vector tile downloads are already cached by the browser (for 2 hours), this ticket is only about the fact they are reparsed every time, which leaves some room for memory footprint / performance improvement, but not significantly noticeable. If browser cache is not enough, we could add a cache manifest so that the tiles are cached forever (until reset). I think the demo should be good to go in the current state, because any significant improvement would be non-trivial (not a last-minute fix). But maybe @ansis or @tmcw have suggestions. |
Caching the parsed geometries and labels should have some noticeable impact. Label placement can take 200-400ms in some of the densest areas right now, so caching should let us skip redoing that every time a tile reappears on the screen. |
Just to clear of some confusion around @gundersen's question. The tiles have to be reloaded no matter where they are coming whether they are cached or served. If you zoom around then turn off your wifi, the tiles will still load. |
added in e52bce1 - It holds onto 20 most recently used tiles to avoid reparsing them when quickly switching between zoom levels. |
remove examples
e1a7bba#commitcomment-4879825
The text was updated successfully, but these errors were encountered: