You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by GitBox <gi...@apache.org> on 2019/11/22 18:48:39 UTC

[GitHub] [lucene-solr] jpountz commented on a change in pull request #1031: LUCENE-9059: Reduce garbage created by ByteBuffersDataOutput.

jpountz commented on a change in pull request #1031: LUCENE-9059: Reduce garbage created by ByteBuffersDataOutput.
URL: https://github.com/apache/lucene-solr/pull/1031#discussion_r349741552
 
 

 ##########
 File path: lucene/core/src/java/org/apache/lucene/store/ByteBuffersDataOutput.java
 ##########
 @@ -279,11 +279,12 @@ public ByteBuffersDataInput toDataInput() {
    * Copy the current content of this object into another {@link DataOutput}.
    */
   public void copyTo(DataOutput output) throws IOException {
-    for (ByteBuffer bb : toBufferList()) {
+    for (ByteBuffer bb : blocks) {
       if (bb.hasArray()) {
 
 Review comment:
   this condition was always `false` before because toBufferList calls `asReadOnlyBuffer` on the buffers

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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