From ad077a9f338dff3fbbfa3e05df360b325f359c46 Mon Sep 17 00:00:00 2001 From: uye <99072975+ABA2396@users.noreply.github.com> Date: Wed, 9 Apr 2025 16:58:37 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E7=83=AD=E6=9B=B4=E6=96=B0=E8=B5=84?= =?UTF-8?q?=E6=BA=90=E6=94=B9=E4=B8=BA=E5=BC=82=E6=AD=A5=E5=8A=A0=E8=BD=BD?= =?UTF-8?q?=E9=81=BF=E5=85=8D=E5=90=AF=E5=8A=A8=E9=98=BB=E5=A1=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/MaaWpfGui/Services/StageManager.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/MaaWpfGui/Services/StageManager.cs b/src/MaaWpfGui/Services/StageManager.cs index f5f9f7f071..eedbca6531 100644 --- a/src/MaaWpfGui/Services/StageManager.cs +++ b/src/MaaWpfGui/Services/StageManager.cs @@ -46,7 +46,7 @@ namespace MaaWpfGui.Services private static readonly ILogger _logger = Log.ForContext(); // data - private Dictionary _stages; + private Dictionary _stages = []; /// /// Initializes a new instance of the class. @@ -158,7 +158,10 @@ namespace MaaWpfGui.Services await Instances.MaaApiService.RequestMaaApiWithCache(tasksPath); } - Instances.AsstProxy.LoadResource(); + await Task.Run(() => + { + Instances.AsstProxy.LoadResource(); + }); return activity; }