asfimport opened a new issue, #241:
URL: https://github.com/apache/arrow-java/issues/241

   In several places in the Java codebase you can see this kind of pattern:
   ```java
   
       while (vector.getDataBuffer().capacity() < toCapacity) {
         vector.reallocDataBuffer();
       }
   ```
   
   In the event that a much larger capacity is requested, this will spuriously 
make several reallocations (doubling the capacity each time).
   
   It would probably be more efficient to reallocate directly to satisfy the 
desired capacity.
   
   Coincidentally, there's a `reallocDataBuffer` overload that seems to do just 
that.
   
   **Reporter**: [Antoine 
Pitrou](https://issues.apache.org/jira/browse/ARROW-17919) / @pitrou
   
   <sub>**Note**: *This issue was originally created as 
[ARROW-17919](https://issues.apache.org/jira/browse/ARROW-17919). Please see 
the [migration documentation](https://github.com/apache/arrow/issues/14542) for 
further details.*</sub>


-- 
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.

To unsubscribe, e-mail: issues-unsubscr...@arrow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to