This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
xdm model uses ExtSyntaxSupport to create tokens. When hl7 schemas (fields.xsd) are loaded as a result of creating xdm model, I can see that 2mb of char[] is occupied by lastModifyUndoEdit. See attached heap dump images. hl7 (fields.xsd) schema can be found in xml/xdm unit tests.
Created attachment 44129 [details] heap dump image 1
Created attachment 44130 [details] instance view of char[]
The lastModifyUndoEdit was created and maintained for fix of the issue 8692. To fix that deadlock (between UndoManager and Document locking) the undoing could be invoked asynchronously so the document has to check whether the undoable edit being undone is really the last one performed. Currently the undoing is again done synchronously and UM pre-locks the document first before locking itself to prevent deadlock so the funcionality of lastModifyUndoEdit should no longer be required. We can clear the field after BaseDocument.read() relatively safely because we can rely that the UM's queue will be cleared as well (by CloneableEditorSupport) after document's load. This is not P1 downgrading to P2.
Checking in BaseDocument.java; /cvs/editor/libsrc/org/netbeans/editor/BaseDocument.java,v <-- BaseDocument.java new revision: 1.143; previous revision: 1.142