[Patch] Reduce memory footprint in Node and WayPoint
|Reported by:||anonymous||Owned by:||team|
The attached patch reduces the memory footprint of the Node and WayPoint classes. This is relevant, because JOSM internally creates a lot of Node instances (in particular in large datasets) and a lot of WayPoints, if GPS-Data is downloaded from the OSM server.
The patch mainly:
- makes CachedLatLon obsolete. Major drawback of current CachedLatLon: each instance keeps a reference to the current global projection
- inlines the lat/lon coordinates and the cached, projected east/north coordinates in the classes Node and WayPoint
- properly reprojects Nodes and WayPoints, when the projection is changed
Attached a patch against JOSM 4114, formatted using git format-patch. If applied in Eclipse, you'll have to manually merge the very last entry. Just accept the update to Main.setProjection(new Epsg4326()); and ignore the rest.
Change History (23)
comment:19 Changed 2 years ago by anonymous
- Resolution set to invalid
- Status changed from new to closed