Bug 575893 - [performance] improve file search: cache CharSequence
Use up to 2MB temporary memory to improve the pattern match.
During file search a custom CharSequence with a complicated
charAt() is passed.
(with a blocked buffer, which needs too switch blocks
if position falls out of block range.)
The charAt() is the hotspot during pattern matching.
By converting the sequence once (linary) into a String the
String.charAt() nicely inlines
(with well known constant time behaviour for String.charAt()).
Change-Id: I123732a6052ee536a0f968432b5c5fc7bdf7e4ad
Signed-off-by: Joerg Kubitz <jkubitz-eclipse@gmx.de>
Reviewed-on: https://git.eclipse.org/r/c/platform/eclipse.platform.text/+/185195
Tested-by: Platform Bot <platform-bot@eclipse.org>
Tested-by: Lars Vogel <Lars.Vogel@vogella.com>
Reviewed-by: Lars Vogel <Lars.Vogel@vogella.com>
1 file changed