Opened 7 years ago
Closed 7 years ago
#14572 closed enhancement (fixed)
Don't index MultipolygonCache by NavigatableComponent
Reported by: | michael2402 | Owned by: | Don-vip |
---|---|---|---|
Priority: | normal | Milestone: | 17.03 |
Component: | Core mappaint | Version: | |
Keywords: | MultipolygonCache | Cc: | Don-vip |
Description
Currently, the multipolygon cache is indexed by:
- The navigatable component
- The data set
- The relation.
I'd suggest changing this to remove the Navigatable component requirement. The nc is never used when building the polygon data. It is just used for clearing - but the cache should be cleared automatically when the data sets are removed.
We could then add two new methods:
public Multipolygon get(Relation r); public Multipolygon forceRefresh(Relation r);
It might make sense to index the cache by projection - since some relation tests (intersections, ...) depend on the projection used. But I'd rather move this to the PolyData class - that class currently does the LatLon->EastNorth conversion for multipolygons and caches it. We might even remove it some day, since we do a lot of extra work in the GUI (clamping, ...) that does not allow us to use the cached polygons directly. It would not cause a speed decrease if we directly iterate over the nodes and use their cached East/North values instead.
Is there any reason the cache is indexed by NC?
(Background: I'm currently working on the style parsing tests (StyleCacheTest, MapCSSRendererTest, ...) and there are dependencies on Main.map in :closed
and other parts just because of this issue. We could run tests without registering the map frame if it was not required by the MultipolygonCache - which would allow us to start with a cleaner state).
Attachments (0)
Change History (2)
comment:1 by , 7 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:2 by , 7 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
In 11779/josm: