From 30a2ecfc23fa7ca194eb465aa5bc32d21fc9c312 Mon Sep 17 00:00:00 2001 From: daniaal Date: Mon, 24 Sep 2018 14:43:24 +0100 Subject: [PATCH] [SL.Core] Update descriptions on the ArrayPoolMemoryAllocator class --- ...ayPoolMemoryAllocator.CommonFactoryMethods.cs | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/SixLabors.Core/Memory/ArrayPoolMemoryAllocator.CommonFactoryMethods.cs b/src/SixLabors.Core/Memory/ArrayPoolMemoryAllocator.CommonFactoryMethods.cs index a82948ebc..f35547810 100644 --- a/src/SixLabors.Core/Memory/ArrayPoolMemoryAllocator.CommonFactoryMethods.cs +++ b/src/SixLabors.Core/Memory/ArrayPoolMemoryAllocator.CommonFactoryMethods.cs @@ -42,26 +42,28 @@ namespace SixLabors.Memory DefaultNormalPoolBucketCount); } + /// - /// For environments with limited memory capabilities. Only small images are pooled, which can result in reduced througput. + /// For environments with very limited memory capabilities, only small buffers like image rows are pooled. /// /// The memory manager - public static ArrayPoolMemoryAllocator CreateWithModeratePooling() + public static ArrayPoolMemoryAllocator CreateWithMinimalPooling() { - return new ArrayPoolMemoryAllocator(1024 * 1024, 32 * 1024, 16, 24); + return new ArrayPoolMemoryAllocator(64 * 1024, 32 * 1024, 8, 24); } /// - /// Only pool small buffers like image rows. + /// For environments with limited memory capabilities, only small array requests are pooled, which can result in reduced throughput. /// /// The memory manager - public static ArrayPoolMemoryAllocator CreateWithMinimalPooling() + public static ArrayPoolMemoryAllocator CreateWithModeratePooling() { - return new ArrayPoolMemoryAllocator(64 * 1024, 32 * 1024, 8, 24); + return new ArrayPoolMemoryAllocator(1024 * 1024, 32 * 1024, 16, 24); } + /// - /// RAM is not an issue for me, gimme maximum througput! + /// For environments where memory capabilities are not an issue, the maximum amount of array requests are pooled which results in optimal throughput. /// /// The memory manager public static ArrayPoolMemoryAllocator CreateWithAggressivePooling()