mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
cache frozen documents
This commit is contained in:
@@ -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));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user