﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
19898	[Patch] Performance improvements for DatasetMerger	GerdP	GerdP	"Sometimes JOSM needs much longer than expected to perform an action, eg. when you have a rather complex relation in the selection and use `Update Selection`. I wondered what goes on and found that `DatasetMerger.merge()` is very inefficient when the target dataset contains lots of objects, no matter how many object the source has.
Reason: It creates a list of target nodes which is only needed when the source contains an object that has a negative id.  
{{{
#!java
List<? extends OsmPrimitive> candidates = new ArrayList<>(targetDataSet.getNodes());
...
candidates = new ArrayList<>(targetDataSet.getWays());
...
candidates = new ArrayList<>(targetDataSet.getRelations());
}}}
Problem: These lines require repeated iterations over `SubclassFilteredCollection` instances.
"	enhancement	closed	normal	20.11	Core		fixed	performance	
