﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
24075	Reduce memory allocations for TaggingPresetItem#matches	taylor.smock	team	"There are two things going on here:
1. `MatchType#ofString` creates a new enumset each time it is called just to iterate through the values. This can be fixed either by calling `values()` or using a cached array. I elected to use a cached array for gc purposes. It would ''probably'' be better to change `KeyedItem` to have a `setMatch` method and get the keyed item there. This accounts for ~25% of the current CPU cost for `TaggingPresetItem#matches`. I haven't experimented with `setMatch` since I don't know if it would break EasyPresets.
2. Massive memory allocations due to `ArrayList.Itr` creation (~75% of ''all'' memory allocations during validation of Colorado). This can be fixed by using a traditional `for` loop.

In testing, the total improvements for these two changes as measured when validating a Colorado pbf extract were as follows:
* 99% reduction in memory allocations (purely from avoiding `ArrayList.Itr` creation)
* 80% reduction in GC
* 59% reduction in CPU usage
 * 35% is from `MatchType#ofString`. This is still >50% of the CPU cycles for `TaggingPresetItem#matches` though."	defect	closed	normal	25.01	Core		fixed		maripogoda
