From 5c6c96b6c024b9f9dd8906a964aeb5e8fb47b189 Mon Sep 17 00:00:00 2001 From: Ottermandias Date: Thu, 9 Mar 2023 15:37:25 +0100 Subject: [PATCH] Improve startup performance tracking --- OtterGui | 2 +- Penumbra/Interop/Resolver/PathResolver.cs | 1 + Penumbra/Util/PerformanceType.cs | 10 +++++----- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/OtterGui b/OtterGui index 9ee5721e..d7867dfa 160000 --- a/OtterGui +++ b/OtterGui @@ -1 +1 @@ -Subproject commit 9ee5721e317457e98f2b8a4500776770f57d204e +Subproject commit d7867dfa6579d4e69876753e9cde72e13d3372ce diff --git a/Penumbra/Interop/Resolver/PathResolver.cs b/Penumbra/Interop/Resolver/PathResolver.cs index 46e075c7..8e60cf91 100644 --- a/Penumbra/Interop/Resolver/PathResolver.cs +++ b/Penumbra/Interop/Resolver/PathResolver.cs @@ -38,6 +38,7 @@ public partial class PathResolver : IDisposable public unsafe PathResolver( ResourceLoader loader ) { + using var tApi = Penumbra.StartTimer.Measure( StartTimeType.PathResolver ); SignatureHelper.Initialise( this ); _loader = loader; _animations = new AnimationState( DrawObjects ); diff --git a/Penumbra/Util/PerformanceType.cs b/Penumbra/Util/PerformanceType.cs index 80205f7c..e5941ea8 100644 --- a/Penumbra/Util/PerformanceType.cs +++ b/Penumbra/Util/PerformanceType.cs @@ -1,6 +1,4 @@ -using Lumina.Excel.GeneratedSheets; -using OtterGui.Classes; -using Penumbra.GameData; +using System; namespace Penumbra.Util; @@ -15,8 +13,9 @@ public enum StartTimeType Backup, Mods, Collections, - Api, + PathResolver, Interface, + Api, } public enum PerformanceType @@ -63,7 +62,8 @@ public static class TimingExtensions StartTimeType.Collections => "Loading Collections", StartTimeType.Api => "Setting Up API", StartTimeType.Interface => "Setting Up Interface", - _ => $"Unknown {( int )type}", + StartTimeType.PathResolver => "Setting Up Path Resolver", + _ => $"Unknown {(int) type}", }; public static string ToName( this PerformanceType type )