mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
let LowLevelSearchUtil cache texts by identity: equals is too expensive for long file texts, which are equal but not same (happens when typing a letter and backspacing it)
This commit is contained in:
@@ -229,7 +229,8 @@ public class LowLevelSearchUtil {
|
||||
LOG.error(msg);
|
||||
}
|
||||
|
||||
private static final ConcurrentMap<CharSequence, Map<StringSearcher, int[]>> cache = ContainerUtil.createConcurrentWeakMap();
|
||||
private static final ConcurrentMap<CharSequence, Map<StringSearcher, int[]>> cache =
|
||||
ContainerUtil.createConcurrentWeakMap(ContainerUtil.identityStrategy());
|
||||
public static boolean processTextOccurrences(@NotNull CharSequence text,
|
||||
int startOffset,
|
||||
int endOffset,
|
||||
|
||||
Reference in New Issue
Block a user