[ 
https://issues.apache.org/jira/browse/ARROW-17919?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17653666#comment-17653666
 ] 

Apache Arrow JIRA Bot commented on ARROW-17919:
-----------------------------------------------

This issue was last updated over 90 days ago, which may be an indication it is 
no longer being actively worked. To better reflect the current state, the issue 
is being unassigned per [project 
policy|https://arrow.apache.org/docs/dev/developers/bug_reports.html#issue-assignment].
 Please feel free to re-take assignment of the issue if it is being actively 
worked, or if you plan to start that work soon.

> [Java] Potentially inefficient variable-width vector reallocation
> -----------------------------------------------------------------
>
>                 Key: ARROW-17919
>                 URL: https://issues.apache.org/jira/browse/ARROW-17919
>             Project: Apache Arrow
>          Issue Type: Wish
>          Components: Java
>            Reporter: Antoine Pitrou
>            Assignee: Larry White
>            Priority: Minor
>
> In several places in the Java codebase you can see this kind of pattern:
> {code:java}
>     while (vector.getDataBuffer().capacity() < toCapacity) {
>       vector.reallocDataBuffer();
>     }
> {code}
> 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.



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

Reply via email to