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.

Bug 220381

Summary: Improve save operation performance by saving to memory output stream under document lock
Product: platform Reporter: Miloslav Metelka <mmetelka>
Component: TextAssignee: Miloslav Metelka <mmetelka>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P3    
Version: 7.3   
Hardware: PC   
OS: Linux   
Issue Type: DEFECT Exception Reporter:

Description Miloslav Metelka 2012-10-18 18:55:03 UTC
After introduction of save actions and due to a recent fix of issue #218679 the grabbing of document's data is done under document's write lock. If output stream is slow (e.g. due to files being accessed over the network) the save operation would block the document as well.
To improve performance I propose to call CloneableEditorSupport.saveFromKitToStream() with an in-memory OutputStream and write to real file outside of the document's lock.
Comment 1 Miloslav Metelka 2012-10-18 20:12:01 UTC
Implemented:
http://hg.netbeans.org/jet-main/rev/3e982b70e64e
Comment 2 Miloslav Metelka 2012-10-19 07:36:16 UTC
I need to fix one failing test.
Comment 3 Miloslav Metelka 2012-10-19 08:44:35 UTC
http://hg.netbeans.org/jet-main/rev/3d32c51b217d