Skip to content

I20201226-0940

@iloveeclipse iloveeclipse tagged this 24 Dec 19:21
workspace matches

Replaced array of IResource objects with Set of String paths generated
from those resources - that allows constant lookup time and awoids
memory waste.

- there is no need to use resourcePath.startsWith() - the only possible
candidates are *.java files (both for search string/set content).
- elements[i].getFullPath().toString() is used for every resource in the
set and every search candidate, resulting in N² complexity and extra
CPU/memory overhead on IPath to String conversion.

Change-Id: Ibf88a9128f74f843158c9c60b86951ceac064dcd
Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
Assets 2
Loading