[ 
https://issues.apache.org/jira/browse/LUCENE-10657?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

LuYunCheng updated LUCENE-10657:
--------------------------------
    Description: 
This is derived from [LUCENE-10627|[https://github.com/apache/lucene/pull/987]]

Code: [https://github.com/apache/lucene/pull/1034] 

The abstract method `copyBytes` in DataOutput have to copy from input to a 
copyBuffer and then write into ByteBuffersDataOutput.blocks, i think there is 
unnecessary, we can override it, copy directly from input into output.

with override this method,
 # Reduce memory copy in `Lucene90CompressingStoredFieldsWriter#copyOneDoc` -> 
`bufferdDocs.copyBytes(DataInput input)`
 # Reduce memory copy in `Lucene90CompoundFormat.writeCompoundFile` -> 
`data.copyBytes` when input is `BufferedChecksumIndexinput` and output is 
`ByteBuffersDataOutput`
 # Reduce memory `IndexWriter#copySegmentAsIs` ->CopyFrom -> copyBytes

 
 

  was:
This is derived from 
[LUCENE-10627|[https://github.com/apache/lucene/pull/987]|https://github.com/apache/lucene/pull/987].]

The abstract method `copyBytes` in DataOutput have to copy from input to a 
copyBuffer and then write into ByteBuffersDataOutput.blocks, i think there is 
unnecessary, we can override it, copy directly from input into output.

with override this method,
 # Reduce memory copy in `Lucene90CompressingStoredFieldsWriter#copyOneDoc` -> 
`bufferdDocs.copyBytes(DataInput input)`
 # Reduce memory copy in `Lucene90CompoundFormat.writeCompoundFile` -> 
`data.copyBytes` when input is `BufferedChecksumIndexinput` and output is 
`ByteBuffersDataOutput`
 # Reduce memory `IndexWriter#copySegmentAsIs` ->CopyFrom -> copyBytes

 
 


> Reduce memory copy in DataOutput copyBytes
> ------------------------------------------
>
>                 Key: LUCENE-10657
>                 URL: https://issues.apache.org/jira/browse/LUCENE-10657
>             Project: Lucene - Core
>          Issue Type: Improvement
>          Components: core/store
>            Reporter: LuYunCheng
>            Priority: Major
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> This is derived from 
> [LUCENE-10627|[https://github.com/apache/lucene/pull/987]]
> Code: [https://github.com/apache/lucene/pull/1034] 
> The abstract method `copyBytes` in DataOutput have to copy from input to a 
> copyBuffer and then write into ByteBuffersDataOutput.blocks, i think there is 
> unnecessary, we can override it, copy directly from input into output.
> with override this method,
>  # Reduce memory copy in `Lucene90CompressingStoredFieldsWriter#copyOneDoc` 
> -> `bufferdDocs.copyBytes(DataInput input)`
>  # Reduce memory copy in `Lucene90CompoundFormat.writeCompoundFile` -> 
> `data.copyBytes` when input is `BufferedChecksumIndexinput` and output is 
> `ByteBuffersDataOutput`
>  # Reduce memory `IndexWriter#copySegmentAsIs` ->CopyFrom -> copyBytes
>  
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to