A word of caution here...

Using a shared FileChannel.pread actually performs a synchronization under Windows.

See JDK bug http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6265734

I submitted this, and it was verified using the supplied test case.


On Dec 17, 2006, at 1:31 PM, Doug Cutting wrote:

Doron Cohen wrote:
Also, if nio proves to be faster in this scenario, it might make sense to
keep current FSDirectory, and just add FSDirectoryNio implementation.

If nio isn't considerably slower for single-threaded applications, I'd vote to simply switch FSDirectory to use nio, simplifying the public API by reducing choices. But if classic io is faster for single-threaded apps, and nio faster for multi-threaded, that would suggest adding a new, public, nio-based Directory implementation.

Doug

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Reply via email to