回复: 回复:RE: why lucene not use DirectByteBuffer in NIOFSDirectory

2013-08-07 Thread wangzhijiang999
nfusings.   - 原邮件 - 发件人: Uwe Schindler 收件人: java-user@lucene.apache.org 抄送: 发送日期: 2013年8月7日, 星期三, 1:17 下午 主题: RE: 回复:RE: why lucene not use DirectByteBuffer in NIOFSDirectory Hi, 1) ByteBuffer bb=ByteBuffer.wrap(new byte[len]);  //bb is HeapByteBuffer     channel.read

RE: 回复:RE: why lucene not use DirectByteBuffer in NIOFSDirectory

2013-08-07 Thread Uwe Schindler
ijiang...@aliyun.com [mailto:wangzhijiang...@aliyun.com] Sent: Wednesday, August 07, 2013 11:36 AM To: java-user Subject: 回复:RE: why lucene not use DirectByteBuffer in NIOFSDirectory Hi Uwe: Thank you for your detail explaination and I learnt a lot from your message. First, the direct

回复:RE: why lucene not use DirectByteBuffer in NIOFSDirectory

2013-08-07 Thread wangzhijiang999
---发件人:Uwe Schindler发送日期:2013年7月31日 18:18收件人:java-user@lucene.apache.org;wangzhijiang...@yahoo.com.cn;主 题:RE: why lucene not use DirectByteBuffer in NIOFSDirectory Hi,There is a misunderstanding: Just by allocating a direct buffer, there is still no difference to a heap buffer in the workflo

RE: why lucene not use DirectByteBuffer in NIOFSDirectory

2013-07-31 Thread Uwe Schindler
9 AM > To: java-user@lucene.apache.org > Subject: why lucene not use DirectByteBuffer in NIOFSDirectory > > I read this article "Use Lucene's MMapDirectory on 64bit platforms, please!" > and it said the MMapDirectory is better than other Directory because it will > v

why lucene not use DirectByteBuffer in NIOFSDirectory

2013-07-31 Thread wangzhijiang999
I read this article "Use Lucene's MMapDirectory on 64bit platforms, please!" and it said the MMapDirectory is better than other Directory because it will void copy data between file system cache and java heap.   I checked the source code of NIOFSDirectory, and in new Buffer method it called "Byt