From 6725bc381cb4e30daa17dbae6470e511feb44447 Mon Sep 17 00:00:00 2001 From: Adrien Allard Date: Thu, 3 Jun 2021 16:20:30 +0200 Subject: [PATCH] Profile settings load duration --- Application/FileConverter/Services/SettingsService.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Application/FileConverter/Services/SettingsService.cs b/Application/FileConverter/Services/SettingsService.cs index f36be39..1050344 100644 --- a/Application/FileConverter/Services/SettingsService.cs +++ b/Application/FileConverter/Services/SettingsService.cs @@ -5,6 +5,7 @@ using FileConverter.Properties; namespace FileConverter.Services { using System; + using System.Diagnostics; using System.IO; using System.Windows; @@ -125,7 +126,12 @@ namespace FileConverter.Services Settings userSettings = null; try { + var stopwatch = new Stopwatch(); + stopwatch.Start(); XmlHelpers.LoadFromFile("Settings", FileConverterExtension.PathHelpers.UserSettingsFilePath, out userSettings); + stopwatch.Stop(); + Debug.Log($"Settings load time: {stopwatch.Elapsed.TotalMilliseconds}ms"); + settings = userSettings; } catch (Exception)