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.
Analysis of activities invoked with a keystroke revealed that notifyModified() is called each time. It forwards the notification throughout the whole stack although the document is already marked modified. It means stat()ing the file on each keystroke. It can be really troublesome on slow filesystems, e.g. on network.
The editor does not call notifyModified() directly. Editor fires registered DocumentListeners and one of them then calls the notifyModified() in openide/text. AFAIK this was always the case and notifyModified() only did the actual work (marking the file with * etc.) if the document was not modified previously (there should be "alreadyModified" flag). Anyway reassigning to openide/editor for evaluation.
Another problem is that the notifyModified is called under the document lock, which prevents future calls to mdr. I am going to change the flow to call the method just once and without holding any locks.
You mean the issue 51872, right?
openide$ cvs -q ci -m "#52493: CES.notifyModified is called just once and attention is also paid to its return value - if it is false the next undo will be reverted" Checking in src/org/openide/text/CloneableEditorSupport.java; /cvs/openide/src/org/openide/text/CloneableEditorSupport.java,v <-- CloneableEditorSupport.java new revision: 1.140; previous revision: 1.139 done Processing log script arguments... More commits to come... RCS file: /cvs/openide/test/unit/src/org/openide/text/NotifyModifiedTest.java,v done Checking in test/unit/src/org/openide/text/NotifyModifiedTest.java; /cvs/openide/test/unit/src/org/openide/text/NotifyModifiedTest.java,v <-- NotifyModifiedTest.java initial revision: 1.1 done Checking in test/unit/src/org/openide/text/UndoRedoCooperationTest.java; /cvs/openide/test/unit/src/org/openide/text/UndoRedoCooperationTest.java,v <-- UndoRedoCooperationTest.java new revision: 1.5;