Skip to content

Commit e554dca

Browse files
Update src/ImageSharp/IO/ChunkedMemoryStream.cs
Co-authored-by: Anton Firszov <[email protected]>
1 parent 1ad9e56 commit e554dca

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/ImageSharp/IO/ChunkedMemoryStream.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -546,6 +546,8 @@ private void ReleaseMemoryChunks(MemoryChunk chunk)
546546
[MethodImpl(MethodImplOptions.AggressiveInlining)]
547547
private static int GetChunkSize(int i)
548548
{
549+
// Increment chunks sizes with moderate speed, but without using too many buffers from the same ArrayPool bucket of the default MemoryAllocator.
550+
// https://github.com/SixLabors/ImageSharp/pull/2006#issuecomment-1066244720
549551
#pragma warning disable IDE1006 // Naming Styles
550552
const int _128K = 1 << 17;
551553
const int _4M = 1 << 22;

0 commit comments

Comments
 (0)