"Boxer, Aaron" <aaron.bo...@uhn.ca> wrote: >Thanks, Oleg. I am not trying to criticize the project in any way; just >wondering if anyone has insight into why, on Windows, Java NIO is so >much slower than stream IO. > >Perhaps it has to do with buffer size, thread count, ..... ? >
You are welcome to criticize. I am merely trying to say this might be not the best list for this question. Thanks, Oleg. I do think there is something in the library, or how I am configuring the library, that is slowing me down: I made a simple test: I wrote a few lines of Java using File channel and transferTo(...) method to read files from my DVD and write to the hard drive. With this simple test, the transferTo(...) method gets about 4 MB /S transfer rate to disk. Then, I put some timing code into the LengthDelimitedEncoder.transfer(...) method, and ran my application, which copies files from DVD to a socket. And the transferTo(...) from file to socket was getting about 0.7 MB /s . This is a 6 X degradation in performance. And, if you recall, if the files are already in the OS file cache, I get about 100 MB/S, so the socket is not slowing me down. So, it is in the library somewhere. Any advice on how to debug this would be very much appreciated. Cheers, Aaron This e-mail may contain confidential and/or privileged information for the sole use of the intended recipient. Any review or distribution by anyone other than the person for whom it was originally intended is strictly prohibited. If you have received this e-mail in error, please contact the sender and delete all copies. Opinions, conclusions or other information contained in this e-mail may not be that of the organization.