[ 
https://issues.apache.org/jira/browse/AVRO-3167?focusedWorklogId=654115&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-654115
 ]

ASF GitHub Bot logged work on AVRO-3167:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 22/Sep/21 15:32
            Start Date: 22/Sep/21 15:32
    Worklog Time Spent: 10m 
      Work Description: belugabehr opened a new pull request #1275:
URL: https://github.com/apache/avro/pull/1275


   Make sure you have checked _all_ steps below.
   
   ### Jira
   
   - [X] My PR addresses the following [Avro 
Jira](https://issues.apache.org/jira/browse/AVRO/) issues and references them 
in the PR title. For example, "AVRO-1234: My Avro PR"
     - https://issues.apache.org/jira/browse/AVRO-XXX
     - In case you are adding a dependency, check if the license complies with 
the [ASF 3rd Party License 
Policy](https://www.apache.org/legal/resolved.html#category-x).
   
   ### Tests
   
   - [X] My PR adds the following unit tests __OR__ does not need testing for 
this extremely good reason:
   No change in behavior, simply performance/simplicity
   
   ### Commits
   
   - [X] My commits all reference Jira issues in their subject lines. In 
addition, my commits follow the guidelines from "[How to write a good git 
commit message](https://chris.beams.io/posts/git-commit/)":
     1. Subject is separated from body by a blank line
     1. Subject is limited to 50 characters (not including Jira issue reference)
     1. Subject does not end with a period
     1. Subject uses the imperative mood ("add", not "adding")
     1. Body wraps at 72 characters
     1. Body explains "what" and "why", not "how"
   
   ### Documentation
   
   - [X] In case of new functionality, my PR adds documentation that describes 
how to use it.
     - All the public functions and the classes in the PR contain Javadoc that 
explain what it does
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

            Worklog Id:     (was: 654115)
    Remaining Estimate: 0h
            Time Spent: 10m

> Simplify Codec Buffer Allocation
> --------------------------------
>
>                 Key: AVRO-3167
>                 URL: https://issues.apache.org/jira/browse/AVRO-3167
>             Project: Apache Avro
>          Issue Type: Improvement
>          Components: java
>            Reporter: David Mollitor
>            Assignee: David Mollitor
>            Priority: Minor
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> Some performance testing of another product highlighted some weirdness to me 
> in Avro library.  In particular the way that blocks are 
> compressed/decompressed in {{DeflateCodec}}.
> For each block of raw data, it is compressed/decompressed into a new buffer.  
> That new buffer is then immediately written out to disk.  Well, that buffer 
> is requested by the caller with a requested size, but it's a bit odd because 
> the buffer is cached, so only the first call has any affect.  Also, that 
> buffer is expanded as needed, but then is maintained at that size for the 
> life of the application, it is never resized smaller, so it could hold that 
> large (underutilized) buffer for awhile.
> Finally, even if the requested size was working as expected, the "requested" 
> size is quite dubious.  Right now, the requested size is equal to the size of 
> the raw block, which means that the buffer requested for a decompress will 
> always be too small and the buffer created for a compression will always be 
> too big.  Instead, I propose that we just fix a sensible default value for 
> all buffers.



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

Reply via email to