From 0dba3256902231f51355f7315b9d4b4418c96ba5 Mon Sep 17 00:00:00 2001 From: Dev Date: Sun, 10 Nov 2024 15:58:14 +0000 Subject: [PATCH] Force stringbuilder to use size to improve perf --- .../Patches/MainMenu/PluginErrorNotifierPatch.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/SPT.SinglePlayer/Patches/MainMenu/PluginErrorNotifierPatch.cs b/project/SPT.SinglePlayer/Patches/MainMenu/PluginErrorNotifierPatch.cs index f7bb772..ae97169 100644 --- a/project/SPT.SinglePlayer/Patches/MainMenu/PluginErrorNotifierPatch.cs +++ b/project/SPT.SinglePlayer/Patches/MainMenu/PluginErrorNotifierPatch.cs @@ -42,7 +42,7 @@ namespace SPT.SinglePlayer.Patches.MainMenu NotificationManagerClass.DisplayMessageNotification(toastMessage, ENotificationDurationType.Infinite, ENotificationIconType.Alert, Color.red); // Build the error message we'll put in the BepInEx and in-game consoles - var stringBuilder = new StringBuilder(); + var stringBuilder = new StringBuilder(60); stringBuilder.AppendLine($"{consoleHeaderMessage}:"); foreach (string error in Chainloader.DependencyErrors) {