avro-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Zoltan Farkas (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AVRO-1641) parser.java stack should expand quickly up to some threshold rather than start at the threshold
Date Tue, 24 Nov 2015 14:01:10 GMT

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

Zoltan Farkas commented on AVRO-1641:
-------------------------------------

Just be careful with the benchmarking process,
I often see devs use naive benchmarks which show some result that has nothing to do with the
reality.
I do not trust any benchmark which is not done with a benchmarking framework like JMH...
Here is how I use JMH in my project: https://github.com/zolyfarkas/spf4j/tree/master/spf4j-benchmarks

A good benchmark has a good amount of multithreaded runs... (large allocations outside of
TLAB kill scalability due to the locking overhead incurred.)

> parser.java stack should expand quickly up to some threshold rather than start at the
threshold
> -----------------------------------------------------------------------------------------------
>
>                 Key: AVRO-1641
>                 URL: https://issues.apache.org/jira/browse/AVRO-1641
>             Project: Avro
>          Issue Type: Bug
>    Affects Versions: 1.7.7, 1.8.0
>            Reporter: Zoltan Farkas
>            Assignee: Zoltan Farkas
>            Priority: Minor
>         Attachments: AVRO-1641.patch
>
>
> at Parser.java line 65 (https://github.com/apache/avro/blob/trunk/lang/java/avro/src/main/java/org/apache/avro/io/parsing/Parser.java#L65):

>  private void expandStack() {
>     stack = Arrays.copyOf(stack, stack.length+Math.max(stack.length,1024));
>   }
> should probably be:
> private void expandStack() {
>     stack = Arrays.copyOf(stack, stack.length+Math.min(stack.length,1024));
>   }
> This expansion probably is intended to grow exponentially up to 1024, and not exponentially
after 1024...



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

Mime
View raw message