You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "Francois Saint-Jacques (Jira)" <ji...@apache.org> on 2019/11/19 14:12:00 UTC
[jira] [Resolved] (ARROW-7206) [Java] Avoid string concatenation
when calling Preconditions#checkArgument
[ https://issues.apache.org/jira/browse/ARROW-7206?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Francois Saint-Jacques resolved ARROW-7206.
-------------------------------------------
Fix Version/s: 1.0.0
Resolution: Fixed
Issue resolved by pull request 5863
[https://github.com/apache/arrow/pull/5863]
> [Java] 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, pull-request-available
> Fix For: 1.0.0
>
> Attachments: after.png, before.png
>
> Time Spent: 20m
> Remaining Estimate: 0h
>
> 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)