Java GZip an object and serialize it using MappedByteBuffer
I'm serializing a large 3d array to disk.The original data is around 50MB and GZiped output is in Kb's size.But the operation takes around 5 sec's.I would like to optimize it for time.I wa开发者_如何学Gos thinking weather it would be any better to use a mapped read/write since i have seen it has better performance than the usual stream writing.But don't know how to use ObjectOutputStream and GZIPOutputStream along with mappped write.Please suggest weather is it worth using mapped read/write along with object output stream and also please post any sample code if any one has experience doing the same.
The page you linked to shows worse performance for mapped write. It only beats a regular stream on read and seek operations. So I guess this is not going to help you, as both ObjectOutputStream and GZipOutputStream are simple write-appenders.
精彩评论