ome / ome-common-java

Java library providing common functionality for all OME Java components
Other
2 stars 19 forks source link

Add write buffering in RandomAccessOutputStream #78

Open melissalinkert opened 1 year ago

melissalinkert commented 1 year ago

In looking briefly at https://github.com/glencoesoftware/raw2ometiff/issues/104 and https://github.com/ome/bioformats/issues/3983, in both cases repeated calls to NIOFileHandle.setLength cause a significant slowdown. Looking more closely at how writing is implemented in NIOFileHandle and RandomAccessOutputStream, it appears that there is effectively no write buffering happening.

While we can think about shorter term ways to improve bfconvert, raw2ometiff, etc., I think ultimately we'll want to modernize some of the writing implementations here. Some specific ideas:

melissalinkert commented 1 year ago

See also https://github.com/ome/bioformats/pull/3680, https://github.com/ome/bioformats/issues/3480.

dgault commented 1 year ago

Another related issue: https://github.com/ome/bioformats/issues/3983