Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 338169 - Use a BufferedOutputStream in AdaptorUtil#readFile
Summary: Use a BufferedOutputStream in AdaptorUtil#readFile
Status: RESOLVED INVALID
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: Framework (show other bugs)
Version: 3.7   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: equinox.framework-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-24 19:52 EST by Mariot Chauvin CLA
Modified: 2011-02-25 10:43 EST (History)
1 user (show)

See Also:


Attachments
patch for HEAD (1.77 KB, patch)
2011-02-24 19:52 EST, Mariot Chauvin CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mariot Chauvin CLA 2011-02-24 19:52:28 EST
Created attachment 189765 [details]
patch for HEAD

I may miss something obvious, but I think AdaptorUtil#readFile could use a buffered output stream, which should enhance performance when writing big files.

This method seems to be called often by the framework, through org.eclipse.osgi.baseadaptor.bundlefile.ZipBundleFile.
Comment 1 John Arthorne CLA 2011-02-25 09:41:25 EST
It is already using a 1KB buffer for writing, so an extra buffered stream isn't needed. Although for what it's worth, when I tested this in the past I found a larger buffer such as 4-8KB was much faster than a 1KB buffer, but that depends on the size of the file you're writing.
Comment 2 Mariot Chauvin CLA 2011-02-25 10:43:46 EST
(In reply to comment #1)
> It is already using a 1KB buffer for writing, so an extra buffered stream isn't
> needed.

Clearly see it today, sorry for the noise, missed something obvious.