diff --git a/src/SharpIDE.Application/Features/SolutionDiscovery/VsPersistence/VsPersistenceMapper.cs b/src/SharpIDE.Application/Features/SolutionDiscovery/VsPersistence/VsPersistenceMapper.cs index 2154a3c..2cfaa08 100644 --- a/src/SharpIDE.Application/Features/SolutionDiscovery/VsPersistence/VsPersistenceMapper.cs +++ b/src/SharpIDE.Application/Features/SolutionDiscovery/VsPersistence/VsPersistenceMapper.cs @@ -1,4 +1,5 @@ -using Ardalis.GuardClauses; +using System.Diagnostics; +using Ardalis.GuardClauses; using Microsoft.VisualStudio.SolutionPersistence.Model; using Microsoft.VisualStudio.SolutionPersistence.Serializer; @@ -8,6 +9,7 @@ public static class VsPersistenceMapper { public static async Task GetSolutionModel(string solutionFilePath, CancellationToken cancellationToken = default) { + var timer = Stopwatch.StartNew(); // This intermediate model is pretty much useless, but I have left it around as we grab the project nodes with it, which we might use later. var intermediateModel = await GetIntermediateModel(solutionFilePath, cancellationToken); @@ -24,6 +26,8 @@ public static class VsPersistenceMapper Projects = s.Projects.Select(GetSharpIdeProjectModel).ToList() }).ToList(), }; + timer.Stop(); + Console.WriteLine($"Solution model fully created in {timer.ElapsedMilliseconds} ms"); return solutionModel; } diff --git a/src/SharpIDE.Photino/Layout/MainLayout.razor b/src/SharpIDE.Photino/Layout/MainLayout.razor index f872f20..b3f3e48 100644 --- a/src/SharpIDE.Photino/Layout/MainLayout.razor +++ b/src/SharpIDE.Photino/Layout/MainLayout.razor @@ -74,7 +74,6 @@ var solutionFilePath = (string)result.Data!; _solutionFilePath = solutionFilePath; - //await BuildService.BuildSolutionAsync(_solutionFilePath); var solutionModel = await VsPersistenceMapper.GetSolutionModel(_solutionFilePath); _solutionModel = solutionModel; if (AppState.IdeSettings.AutoOpenTerminalOnLaunch)