Repository navigation
[core] Improve tile cache sizing calculation - #7739
Conversation
|
@brunoabinader, thanks for your PR! By analyzing this pull request, we identified @jfirebaugh, @1ec5 and @incanus to be potential reviewers. |
eac8b8e to
05f64cf
Compare
|
Does 'NoCache' also disable disk cache (sqlite)? |
Semantics need to be clarified. But this is not the disk cache, it is the memory cache of parsed tiles. |
05f64cf to
7bbaf51
Compare
There was a problem hiding this comment.
Let's add Memory to the name of this enum
There was a problem hiding this comment.
I don't think this optimization is worth it
There was a problem hiding this comment.
The caching strategy can't change, since it's only ever set in the constructor. It shouldn't be part of the UpdateParameters.
|
Like @jfirebaugh I doubt that this is something we'll have to configure. Instead, we could also make the cache size dependent on currently available RAM: if there's space free, we can cache as much as we want, but if there isn't, evicting items and the short reload delay are preferable to the App hitting OOM. |
Thanks for the feedback @jfirebaugh and @kkaefer - the only downside I see is that with fc4f56d the cache size gets recalculated on every I'll cherry-pick these and update this PR accordingly. |
7bbaf51 to
b8fb71f
Compare
|
@kkaefer Can you re-review? 🙇 |
Comments on outdated/discarded changes.
TileCacheStrategycan now be passed onMapctor as a hint for the style sources about their cache strategy:NoCache: Do not retain tiles.ConservativeCache: Retain visible tiles from all zoom levels.DoubleCache: Twice as conservative.This is also combined with updating the cache size whenever the transform dimensions or zoom range changes.