Skip to content

Commit ef70282

Browse files
committed
Remove excess logging that slows down Hot Reload
1 parent 42ac246 commit ef70282

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/BuiltInTools/dotnet-watch/HotReload/IncrementalMSBuildWorkspace.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,7 @@ private static async ValueTask<SourceText> GetSourceTextAsync(string filePath, E
219219

220220
public async Task ReportSolutionFilesAsync(Solution solution, CancellationToken cancellationToken)
221221
{
222+
#if DEBUG
222223
_logger.LogDebug("Solution: {Path}", solution.FilePath);
223224
foreach (var project in solution.Projects)
224225
{
@@ -245,5 +246,8 @@ async ValueTask InspectDocumentAsync(TextDocument document, string kind)
245246
var text = await document.GetTextAsync(cancellationToken);
246247
_logger.LogDebug(" {Kind}: {FilePath} [{Checksum}]", kind, document.FilePath, Convert.ToBase64String(text.GetChecksum().ToArray()));
247248
}
249+
#else
250+
await Task.CompletedTask;
251+
#endif
248252
}
249253
}

0 commit comments

Comments
 (0)