From 5b32943aa88b657f98fe84669a48f366dac7d751 Mon Sep 17 00:00:00 2001 From: Garry Newman Date: Mon, 3 Jun 2019 11:09:57 +0100 Subject: [PATCH] Increase max string length --- Facepunch.Steamworks/Utility/Helpers.cs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Facepunch.Steamworks/Utility/Helpers.cs b/Facepunch.Steamworks/Utility/Helpers.cs index d37a230..26917a3 100644 --- a/Facepunch.Steamworks/Utility/Helpers.cs +++ b/Facepunch.Steamworks/Utility/Helpers.cs @@ -18,20 +18,19 @@ namespace Steamworks if ( StringBuilderPool == null ) { // - // The pool has 8 items. This should be safe because we shouldn't really + // The pool has 4 items. This should be safe because we shouldn't really // ever be using more than 2 StringBuilders at the same time. // - StringBuilderPool = new StringBuilder[8]; + StringBuilderPool = new StringBuilder[4]; for ( int i = 0; i < StringBuilderPool.Length; i++ ) - StringBuilderPool[i] = new StringBuilder( 4096 ); + StringBuilderPool[i] = new StringBuilder( 1024 * 32 ); } StringBuilderPoolIndex++; if ( StringBuilderPoolIndex >= StringBuilderPool.Length ) StringBuilderPoolIndex = 0; - StringBuilderPool[StringBuilderPoolIndex].Capacity = 4096; StringBuilderPool[StringBuilderPoolIndex].Length = 0; return StringBuilderPool[StringBuilderPoolIndex];