log sln parse time

This commit is contained in:
Matt Parker
2025-08-02 18:03:20 +10:00
parent 5b77fb7030
commit 30bc449c5f
2 changed files with 5 additions and 2 deletions

View File

@@ -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<SharpIdeSolutionModel> 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;
}

View File

@@ -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)