- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 888
Use MemoryAllocator in FixedCapacityPooledMemoryStream #1223
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use MemoryAllocator in FixedCapacityPooledMemoryStream #1223
Conversation
| Codecov Report
 @@            Coverage Diff             @@
##           master    #1223      +/-   ##
==========================================
+ Coverage   82.40%   82.54%   +0.14%     
==========================================
  Files         696      697       +1     
  Lines       30553    30506      -47     
  Branches     3482     3467      -15     
==========================================
+ Hits        25176    25181       +5     
+ Misses       4658     4606      -52     
  Partials      719      719              
 
 Continue to review full report at Codecov. 
 | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Beautiful!
Prerequisites
Description
Integrating
FixedCapacityPooledMemoryStreamwithMemoryAllocatorand moving duplicate async decoder code to a utility class.ArrayPool.Sharedis good when (1) the rented buffer is relatively small (2) theRentoperation is a bottleneck on a hot path. In image processing these conditions are barely true. For a byte array> 1MB, the shared pool is always allocating a new array, which is a common for raw image streams.