From 93f799ec3fa07010f86562cf305e9687cbe1cb8a Mon Sep 17 00:00:00 2001 From: peter Date: Tue, 14 Aug 2018 11:41:45 +0200 Subject: [PATCH] cache frozen documents --- .../src/com/intellij/openapi/editor/impl/DocumentImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/platform/core-impl/src/com/intellij/openapi/editor/impl/DocumentImpl.java b/platform/core-impl/src/com/intellij/openapi/editor/impl/DocumentImpl.java index c0bf9cba2650..f46537090355 100644 --- a/platform/core-impl/src/com/intellij/openapi/editor/impl/DocumentImpl.java +++ b/platform/core-impl/src/com/intellij/openapi/editor/impl/DocumentImpl.java @@ -535,6 +535,7 @@ public class DocumentImpl extends UserDataHolderBase implements DocumentEx { @Override public void setModificationStamp(long modificationStamp) { myModificationStamp = modificationStamp; + myFrozen = null; } @Override @@ -1195,7 +1196,7 @@ public class DocumentImpl extends UserDataHolderBase implements DocumentEx { synchronized (myLineSetLock) { frozen = myFrozen; if (frozen == null) { - frozen = new FrozenDocument(myText, myLineSet, myModificationStamp, SoftReference.dereference(myTextString)); + myFrozen = frozen = new FrozenDocument(myText, myLineSet, myModificationStamp, SoftReference.dereference(myTextString)); } } }