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

stephane campinas updated ARROW-7206:
-------------------------------------
    Description: 
Preconditions#checkArgument is called in VectorLoader with the String message 
already built.

This causes some noticeable overhead as can be seen from the attached flame 
graphs.

 

Calling checkArgument with an error template instead avoids the call to 
StringBuilder as can be seen in the _after_ image.

  was:
Preconditions#checkArgument is called in VectorLoader with the String message 
already built.

This causes some noticeable overhead as can be seen from the attached flame 
graphs.

 

Calling checkArgument with an error template instead avoids the call to 
StringBuilder as can be seen in the `after` image.


> avoid string concatenation when calling Preconditions#checkArgument
> -------------------------------------------------------------------
>
>                 Key: ARROW-7206
>                 URL: https://issues.apache.org/jira/browse/ARROW-7206
>             Project: Apache Arrow
>          Issue Type: Improvement
>          Components: Java
>            Reporter: stephane campinas
>            Assignee: stephane campinas
>            Priority: Trivial
>              Labels: patch
>         Attachments: after.png, before.png
>
>
> Preconditions#checkArgument is called in VectorLoader with the String message 
> already built.
> This causes some noticeable overhead as can be seen from the attached flame 
> graphs.
>  
> Calling checkArgument with an error template instead avoids the call to 
> StringBuilder as can be seen in the _after_ image.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to