IDEA-136783 Completion: delay showing middle-matched items until at least some (or all) start-matching ones are shown

avoid useless allocations
This commit is contained in:
peter
2015-03-04 18:19:14 +01:00
parent 29038e5e86
commit 15fa559d41
@@ -426,6 +426,7 @@ public class CompletionProgressIndicator extends ProgressIndicatorBase implement
void addDelayedMiddleMatches() {
ArrayList<CompletionResult> delayed;
synchronized (myDelayedMiddleMatches) {
if (myDelayedMiddleMatches.isEmpty()) return;
delayed = ContainerUtil.newArrayList(myDelayedMiddleMatches);
myDelayedMiddleMatches.clear();
}