Shad Storhaug created LUCENENET-643:
---------------------------------------
Summary: NIOFSDirectory performance can be improved
Key: LUCENENET-643
URL: https://issues.apache.org/jira/browse/LUCENENET-643
Project: Lucene.Net
Issue Type: Task
Components: Lucene.Net Core
Affects Versions: Lucene.Net 4.8.0
Reporter: Shad Storhaug
Assignee: Shad Storhaug
The {{FileStreamExtensions::Read()}} method is copying bytes from the stream
into a {{ByteBuffer}} one byte at a time. Performance can be improved by using
an overload of {{Stream.Read()}} that accepts a byte array.
If the {{ByteBuffer.HasArray}} property is {{true}}, a single read operation
can be done to move the data into {{ByteBuffer.Array}}. Otherwise, the data
must be copied into a temporary buffer before calling {{ByteBuffer.Put}}.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)