You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@parquet.apache.org by "Julien Le Dem (JIRA)" <ji...@apache.org> on 2015/02/14 02:12:11 UTC

[jira] [Commented] (PARQUET-186) Poor performance in SnappyCodec because of string concat in tight loop

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

Julien Le Dem commented on PARQUET-186:
---------------------------------------

Argh.
Preconditions.checkArgument should be replaced with an if to avoid generating the string when there is no error.


> Poor performance in SnappyCodec because of string concat in tight loop
> ----------------------------------------------------------------------
>
>                 Key: PARQUET-186
>                 URL: https://issues.apache.org/jira/browse/PARQUET-186
>             Project: Parquet
>          Issue Type: Bug
>          Components: parquet-mr
>    Affects Versions: parquet-mr_1.6.0
>            Reporter: Cristian Opris
>
> String concatenation for SnappyUtil.validateBuffer which is called in a tight 
> loop from both compress/decompress.
> This shows up as taking 60% of time in the profiler 
> {code}
>   public static void validateBuffer(byte[] buffer, int off, int len) {
>     Preconditions.checkNotNull(buffer, "buffer");
>     Preconditions.checkArgument(off >= 0 && len >= 0 && off <= buffer.length - len,
>         "Invalid offset or length. Out of buffer bounds. buffer.length=" + buffer.length
>         + " off=" + off + " len=" + len);
>   }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)