Open geometer opened 9 years ago
HI Nikolay , thanks for your input. Is it possible to write our own PipedStreams for solving this problem in Junar source code.i think that will be a better solution http://www.staldal.nu/tech/2014/03/04/dont-use-pipedoutputstream-on-android/
is it possible to do ?
I think it makes no sense (for this task) to write piped streams working in two threads. “Correct” solution is to implement single-thread implementation that consists of 1) some buffer; 2) method for partial filling this buffer from archive; 3) InputStream that reads from the buffer and calls 2) if needed.
On 2 Feb 2015, at 10:28, venbab notifications@github.com wrote:
HI Nikolay , thanks for your input. Is it possible to write our own PipedStreams for solving this problem in Junar source code.i think that will be a better solution http://www.staldal.nu/tech/2014/03/04/dont-use-pipedoutputstream-on-android/ http://www.staldal.nu/tech/2014/03/04/dont-use-pipedoutputstream-on-android/ is it possible to do ?
— Reply to this email directly or view it on GitHub https://github.com/edmund-wagner/junrar/pull/33#issuecomment-72435000.
Not sure this is a good solution for everyone because the patch increases memory usage. It just loads full archive entry content into memory in getInputStream(). However it changes performance drastically (50 times faster) on my Nexus 7 with Android 5.
Related to #17 and #31.