Helium314
Helium314
> ```kotlin > fun get(bbox) { > val tilesRect = bbox.asTileRect(zoom=16) > val data = cache.get(tilesRect) > return data.filter { it in bbox } > } > ``` > >...
> > A problem I see with a generic cache with lambdas is that the cache for OsmQuestController needs a lambda (bbox, questTypeNames) -> T for decent performance, but a...
> I guess it must be about the extra quests returned that are not visible. That's what I concluded. The slow part is `getAllVisibleInBBoxFromDB`, which is exactly the same as...
Some semi-related comments: I can only use the `position in bbox` you suggested if I change https://github.com/streetcomplete/StreetComplete/blob/c20190bc8df62d299f7122501be89e14e5db0e38/app/src/main/java/de/westnordost/streetcomplete/util/math/SphericalEarthMath.kt#L468 to ```kotlin operator fun BoundingBox.contains(pos: LatLon): Boolean { ``` ------ `OsmQuest.key` is used...
I did some comparison between the current cache(s) for `MapDataController` and my old attempt of the *one cache* (`LinkedHashMap`), focusing on `getMutableMapDataWithGeometry`. There is not much difference in terms of...
> only if it is the same `OsmQuest` on which `key` is called frequently. Currently, quests are being fetched anew from the database all the time. Also, if `key` is...
> > So I can conclude the size of the cache is just the difference before and after clearing caches? > > Probably. I am not sure how quickly the...
It was still in a todo, but done now
So this is now merged, I'll have a look how to make the changed spatial cache work with `MapDataController`, but I think it will not be possible without further changing...
So I think I can offer: * a comeback of `onKeysRemoved` * a spatial cache containing all data, not only nodes * completely unrelated caches, so the non-spatial caches would...