less garbage during massive stub queries (e.g. goto symbol)

This commit is contained in:
peter
2013-08-01 20:00:39 +02:00
parent 8631836b8b
commit 15e74ea692
2 changed files with 2 additions and 6 deletions

View File

@@ -704,7 +704,6 @@ public abstract class PsiFileImpl extends ElementBase implements PsiFileEx, PsiF
ObjectStubTree tree = StubTreeLoader.getInstance().readOrBuild(getProject(), vFile, this);
if (!(tree instanceof StubTree)) return null;
StubTree stubHolder = (StubTree)tree;
tree.setDebugInfo(tree.getDebugInfo() + "\n loaded at " + vFile.getTimeStamp() + "; mod stamp" + getModificationStamp() + "; viewProvider=" + getViewProvider());
synchronized (PsiLock.LOCK) {
if (getTreeElement() != null) return null;

View File

@@ -73,7 +73,7 @@ public class StubTreeLoaderImpl extends StubTreeLoader {
}
if (element instanceof PsiFileStub) {
StubTree tree = new StubTree((PsiFileStub)element);
tree.setDebugInfo("created from file content, timestamp=" + vFile.getTimeStamp());
tree.setDebugInfo("created from file content");
return tree;
}
}
@@ -124,10 +124,7 @@ public class StubTreeLoaderImpl extends StubTreeLoader {
return processError(vFile, "No stub serializer: " + vFile.getPresentableUrl() + ": " + e.getMessage(), e);
}
ObjectStubTree tree = stub instanceof PsiFileStub ? new StubTree((PsiFileStub)stub) : new ObjectStubTree((ObjectStubBase)stub, true);
tree.setDebugInfo("created from index: " + StubUpdatingIndex.getIndexingStampInfo(vFile) +
", wasIndexedAlready=" + wasIndexedAlready +
", docSaved=" + saved +
", queried at " + vFile.getTimeStamp());
tree.setDebugInfo("created from index");
return tree;
}
else if (size != 0) {