Opened 18 years ago
Closed 17 years ago
#482 closed defect (worksforme)
Merging OSM layers very slow
Reported by: | SpeedEvil | Owned by: | anonymous |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | Core | Version: | |
Keywords: | Cc: |
Description
Merging two multi-thousand node layers takes several minutes.
Attachments (0)
Change History (5)
comment:1 by , 17 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:2 by , 17 years ago
Sorry for the delay.
JRE 1.6, duron 1300 - yes, it's slow, but...
http://www.mauve.plus.com/testfiles.osm.tar.gz
(around a meg)
decompress.
Load into JOSM, now press 'merge layer' 25 times.
It's not finished for me after 25 mins of CPU time.
It's not a tiny bit of the map - but there are only on the order of
44000 nodes and 3000 ways.
comment:3 by , 17 years ago
It took 80 CPU minutes, or on the order of 4000 instructions per node, assuming that the complexity is nodes2
comment:4 by , 17 years ago
I hope I improved the situation a bit in r478. I modified the merge button so that in your case you merge small layers into an increasingly big layer (which is faster than the other way round).
But I don't think there are other low-hanging fruits there for disjunct layers, as we need to check for conflicts (e.g. if we have a new way, we need to check all other ways if they are equal to the new way in order to prevent duplicate uploads).
comment:5 by , 17 years ago
Resolution: | → worksforme |
---|---|
Status: | assigned → closed |
While it's now by no-means snappy (8 cpu-minutes), that's a whole lot better than the previous 80.
Thanks!
Several questions:
It takes under 10 seconds on my laptop to merge two layers with 8k nodes (using any of java 5, 6, 7).
(Yes, I know that even that is quite crappy performance. I guess we could speed that up by one or two orders of magnitude just by using hashtables instead of linked lists.)