This commit is contained in:
Alexey Kudravtsev
2016-04-27 13:31:03 +03:00
parent d1b492ffba
commit b3a9c321e4
2 changed files with 7 additions and 4 deletions
@@ -205,7 +205,7 @@ public abstract class TreeElement extends ElementBase implements ASTNode, Clonea
clearRelativeOffsets(next);
}
protected static void clearRelativeOffsets(TreeElement element) {
static void clearRelativeOffsets(TreeElement element) {
TreeElement cur = element;
while (cur != null && cur.myStartOffsetInParent != -1) {
cur.myStartOffsetInParent = -1;
@@ -262,7 +262,7 @@ public abstract class TreeElement extends ElementBase implements ASTNode, Clonea
}
}
protected final void rawInsertAfterMeWithoutNotifications(@NotNull TreeElement firstNew) {
final void rawInsertAfterMeWithoutNotifications(@NotNull TreeElement firstNew) {
firstNew.rawRemoveUpToWithoutNotifications(null, false);
final CompositeElement p = getTreeParent();
final TreeElement treeNext = getTreeNext();
@@ -350,7 +350,7 @@ public abstract class TreeElement extends ElementBase implements ASTNode, Clonea
}
// remove nodes from this[including] to end[excluding] from the parent
protected final void rawRemoveUpToWithoutNotifications(@Nullable TreeElement end, boolean invalidate) {
final void rawRemoveUpToWithoutNotifications(@Nullable TreeElement end, boolean invalidate) {
if(this == end) return;
final CompositeElement parent = getTreeParent();
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2015 JetBrains s.r.o.
* Copyright 2000-2016 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -65,6 +65,9 @@ public class VfsUtilPerformanceTest extends BareTestFixtureTestCase {
}.execute();
VirtualFile theChild = vDir.findChild("5111.txt");
assertNotNull(theChild);
UIUtil.pump(); // wait for all event handlers to calm down
System.out.println("Start searching...");
PlatformTestUtil.startPerformanceTest("find child is slow", 1000, () -> {
for (int i = 0; i < 1000000; i++) {