Bug 575242 - improved isMatchToBeIncluded() check complexity

isMatchToBeIncluded() iterated over every element of the already
processed matches map to check if file matches are equal according to
URIUtil criteria.

However, that is only needed if same file match is not yet in the map -
so for every match on same file we iterated through all map keys,
instead of immediate map lookup & return. That greatly speeds up initial
text replace preparation on search with few matches per file and many
files.

Change-Id: Id620232098142e27f823344501630c891ad16afc
Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
Reviewed-on: https://git.eclipse.org/r/c/platform/eclipse.platform.text/+/183748
Tested-by: Platform Bot <platform-bot@eclipse.org>
Reviewed-by: Simeon Andreev <simeon.danailov.andreev@gmail.com>
1 file changed