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

ASF subversion and git services commented on AVRO-2984:
-------------------------------------------------------

Commit b7d5027291621769653771e4fc91dba98bc08d8d in avro's branch 
refs/heads/master from Joel Turkel
[ https://gitbox.apache.org/repos/asf?p=avro.git;h=b7d5027 ]

AVRO-2984: Optimize Ruby DatumWriter memory consumption (#1014)

This optimizes Ruby datum writing by avoiding an unnecessary hash
allocation for constant validation options and avoids an unnecessary
array allocation for success datum validation results. These
optimizations are on the hot path for writing messages.

> Ruby: Unnecessary memory allocations during serialization
> ---------------------------------------------------------
>
>                 Key: AVRO-2984
>                 URL: https://issues.apache.org/jira/browse/AVRO-2984
>             Project: Apache Avro
>          Issue Type: Improvement
>          Components: ruby
>    Affects Versions: 1.10.0
>            Reporter: Joel Turkel
>            Priority: Major
>
> Profiling our Ruby event publishing pipeline, we see two big sources of 
> unnecessary memory allocations:
>  # Avro::IO:DatumWriter#write_data allocates a hash of constant validation 
> options
>  # Avro::SchemaValidator::Result allocates an errors array which is 
> unnecessary for the common case of no validation errors
> This is on a very hot codepath for us and accounts for roughly 30% of the 
> memory allocated by this part of the event publishing pipeline.
> Github PR coming shortly.



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

Reply via email to