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 - Improve save operation performance by saving to memory output stream under document lock
Summary: Improve save operation performance by saving to memory output stream under do...
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Text (show other bugs)
Version: 7.3
Hardware: PC Linux
: P3 normal (vote)
Assignee: Miloslav Metelka
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-18 18:55 UTC by Miloslav Metelka
Modified: 2012-10-19 08:44 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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