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

Lucas Heimberg edited comment on AVRO-2714 at 12/22/20, 8:27 AM:
-----------------------------------------------------------------

Unfortunately, this optimization introduces the bug 
[AVRO-3005|[https://issues.apache.org/jira/projects/AVRO/issues/AVRO-3005]], 
where reading of a string with > 256 characters might read more bytes from the 
input stream than are actually expected for the string.


was (Author: l.heimberg):
Unfortunately, this optimization introduces the bug 
[AVRO-3005|[https://issues.apache.org/jira/projects/AVRO/issues/AVRO-3005],] 
where reading of a string with > 256 characters might read more bytes from the 
input stream than are actually expected for the string.

> [C#] Use new .NET Core APIs for better performance
> --------------------------------------------------
>
>                 Key: AVRO-2714
>                 URL: https://issues.apache.org/jira/browse/AVRO-2714
>             Project: Apache Avro
>          Issue Type: Bug
>          Components: csharp
>            Reporter: Eric Erhardt
>            Priority: Major
>             Fix For: 1.10.0
>
>
> The BinaryDecoder will create temporary buffers to read strings and floats, 
> and then throw the buffers away. These unnecessary allocations add objects to 
> the GC unnecessarily.
>  
> See
> [https://github.com/apache/avro/blob/ca38fb98f83e0345ca6c49b0660e9fbd03ea3cd5/lang/csharp/src/apache/main/IO/BinaryDecoder.cs#L144]
> [https://github.com/apache/avro/blob/ca38fb98f83e0345ca6c49b0660e9fbd03ea3cd5/lang/csharp/src/apache/main/IO/BinaryDecoder.cs#L95]
>  
> We can multi-target the library and use new APIs on .NET Core 2.1 and .NET 
> Standard 2.1 to eliminate these allocations.



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

Reply via email to