#7159 closed defect (fixed)
Layer merging performance
Reported by: | Don-vip | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Core | Version: | latest |
Keywords: | Cc: |
Description (last modified by )
The "merge layer" action can be slow as hell. With these two data sets, including only new primitives:
- A: 30.000 highways, 80.000 nodes, 9.000 relations associatedStreet
- B: 65.000 addr:housenumber
The loading of each data set takes only few seconds. However if I try to merge them, I'm forced to cancel the operation after several minutes of processing without any visual indication of the remaining time.
Two things to do here:
- Speed up the process, it shouldn't take so long (I have added some traces to measure performances, JOSM merges nodes at the incredible speed of 40 nodes per second !)
- Indicate in a progress bar the advancement (currently, there is no progress bar at all)
Attachments (1)
Change History (8)
comment:1 by , 13 years ago
Description: | modified (diff) |
---|
by , 13 years ago
Attachment: | 7159.patch added |
---|
comment:2 by , 13 years ago
The merging speed bumped in my examples from 40 to 300 nodes per second just by:
- using a XOR in OsmPrimitive.hasEqualSemanticAttributes()
- checking if arrays are null or of the same size before creating and comparing the key maps in AbstractPrimitive.hasSameTags()
- looping on initial target layer primitives instead of current target layer primitives (there's no sensr to check for current primitives as they include primitives we have already merged from the source, right ?)
comment:4 by , 13 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:7 by , 3 years ago
I'm taking a quick look through other methods in LatLon
right now as well, looking for stuff that can/should be moved to ILatLon
. I would not be surprised if some of them are being used like so node.getCoor().greatCircleDistance(otherNode.getCoor())
.
looks at Geometry#getDistance
, Geometry#getDistanceSegmentSegment
(my fault)
Current candidates (I'll open a separate ticket for this):
greatCircleDistance
bearing
interpolate
(maybe -- sticking point is the return value, I'd want to see how it was being used)getCenter
(see above)
EDIT: Ticket opened (#22115).
patch awaiting end of stabilization phase