getLastCommittedStamp doesn't require freezing injected documents, so speed it up
authorpeter <peter@jetbrains.com>
Wed, 28 Oct 2015 17:23:51 +0000 (18:23 +0100)
committerpeter <peter@jetbrains.com>
Wed, 28 Oct 2015 17:52:55 +0000 (18:52 +0100)
platform/core-impl/src/com/intellij/psi/impl/PsiDocumentManagerBase.java

index eb18a6dd2fd3a35e30e03d03ba16fbab489cd114..539598473d1c89a0ba45087df92d8f55449af356 100644 (file)
@@ -592,6 +592,7 @@ public abstract class PsiDocumentManagerBase extends PsiDocumentManager implemen
 
   @Override
   public long getLastCommittedStamp(@NotNull Document document) {
+    if (document instanceof DocumentWindow) document = ((DocumentWindow)document).getDelegate();
     return getLastCommittedDocument(document).getModificationStamp();
   }