From 9333386aa7d5ab5f4af5ec36e00085d42b37bf7f Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Wed, 22 Apr 2026 15:07:01 -0400 Subject: [PATCH] added async to long load time items. --- Program.cs | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/Program.cs b/Program.cs index 2a4c4f7..0d6ddbd 100644 --- a/Program.cs +++ b/Program.cs @@ -51,13 +51,12 @@ HTTPROOT = env.ContentRootPath; -VSERVERWS.Global.Globals.IsDevelopment = app.Environment.IsDevelopment(); -//VSERVERWS.Global.Globals.IsDevelopment = false; +//VSERVERWS.Global.Globals.IsDevelopment = app.Environment.IsDevelopment(); +VSERVERWS.Global.Globals.IsDevelopment = false; -VSERVERWS.Global.Globals.LoadPrinters(); +await Task.Run(() => VSERVERWS.Global.Globals.LoadPrinters()); - -CVGlobal.TryGlobalPRELoadCVCollections(new[] { typeof(CVINVENTORY), typeof(CVCustomers) }); +await Task.Run(() => CVGlobal.TryGlobalPRELoadCVCollections(new[] { typeof(CVINVENTORY), typeof(CVCustomers) })); @@ -74,9 +73,9 @@ app.UseAuthorization(); app.MapRazorPages(); -app.Run(); - +// app.Run(); +await app.RunAsync();