mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
less allocations in PsiDocumentManagerBase.getEventsSinceCommit
GitOrigin-RevId: b33923ba4431b1a4b0d44099a76784e66523d568
This commit is contained in:
committed by
intellij-monorepo-bot
parent
acd7e36b8d
commit
2c927f5bbf
@@ -742,7 +742,8 @@ public abstract class PsiDocumentManagerBase extends PsiDocumentManager implemen
|
||||
assert document instanceof DocumentImpl : document;
|
||||
UncommittedInfo info = myUncommittedInfos.get(document);
|
||||
if (info != null) {
|
||||
return new ArrayList<>(info.myEvents);
|
||||
//noinspection unchecked
|
||||
return (List<DocumentEvent>)info.myEvents.clone();
|
||||
}
|
||||
return Collections.emptyList();
|
||||
|
||||
@@ -1058,7 +1059,7 @@ public abstract class PsiDocumentManagerBase extends PsiDocumentManager implemen
|
||||
|
||||
private static class UncommittedInfo {
|
||||
private final FrozenDocument myFrozen;
|
||||
private final List<DocumentEvent> myEvents = new ArrayList<>();
|
||||
private final ArrayList<DocumentEvent> myEvents = new ArrayList<>();
|
||||
private final ConcurrentMap<DocumentWindow, DocumentWindow> myFrozenWindows = ContainerUtil.newConcurrentMap();
|
||||
|
||||
private UncommittedInfo(@NotNull DocumentImpl original) {
|
||||
|
||||
Reference in New Issue
Block a user