From 8620bb09d5e63ac90b89b7015ff8abe11f9d9d35 Mon Sep 17 00:00:00 2001 From: Saphire Lattice Date: Thu, 22 Aug 2024 00:08:59 +0600 Subject: [PATCH] Untagle logs and speed up search (#35) --- ReplayBrowser/Helpers/ReplayHelper.cs | 2 -- ReplayBrowser/Startup.cs | 4 ---- 2 files changed, 6 deletions(-) diff --git a/ReplayBrowser/Helpers/ReplayHelper.cs b/ReplayBrowser/Helpers/ReplayHelper.cs index a30e312..01d6270 100644 --- a/ReplayBrowser/Helpers/ReplayHelper.cs +++ b/ReplayBrowser/Helpers/ReplayHelper.cs @@ -393,8 +393,6 @@ public async Task SearchReplays(List searchItems, var queryable = _context.Replays .AsNoTracking() - .Include(r => r.RoundParticipants!) - .ThenInclude(r => r.Players) .AsQueryable(); foreach (var searchItem in searchItems) diff --git a/ReplayBrowser/Startup.cs b/ReplayBrowser/Startup.cs index ed49b2e..f04b136 100644 --- a/ReplayBrowser/Startup.cs +++ b/ReplayBrowser/Startup.cs @@ -39,9 +39,6 @@ public void ConfigureServices(IServiceCollection services) options.JsonSerializerOptions.ReferenceHandler = ReferenceHandler.IgnoreCycles; }); - var loggerFactory = LoggerFactory.Create(builder => builder.AddConsole().AddSerilog()); - services.AddSingleton(loggerFactory); - services.AddDbContext(options => { if (Configuration.GetConnectionString("DefaultConnection") == null) @@ -54,7 +51,6 @@ public void ConfigureServices(IServiceCollection services) options.UseNpgsql(Configuration.GetConnectionString("DefaultConnection"), o => o.CommandTimeout(600)); options.EnableSensitiveDataLogging(); - options.UseLoggerFactory(loggerFactory); }); services.AddSingleton();