dotnet / dotnet/format

dotnet-format is very slow on larger repos

Open
#1,378 29 comments 41 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
1.9k
Forks
173
Avg merge
10d 13h
Merged PRs (30d)
1

Description

on our repository (), dotnet-format will take between 4 and 8 seconds to run, even when no changes need to be applied.

I saw #757 but I'm not sure if it's related, thus the new issue.

here's a `-v diag` logging of a particularly bad run:
```
$ dotnet-format -v diag
The dotnet format version is '5.1.225507+756d5a1c121be3e57e924788af64aa5607dc24e1'.
The dotnet runtime version is '5.0.9'.
The dotnet CLI version is '5.0.400'.
Using MSBuild.exe located in '/home/spiral/.dotnet/sdk/5.0.400/'.
Formatting code files in workspace '/home/spiral/sources/pluralkit/PluralKit.sln'.
Loading workspace.
Project PluralKit.Bot is using configuration from '/home/spiral/sources/pluralkit/.editorconfig'.
Project PluralKit.Bot is using configuration from '/home/spiral/sources/pluralkit/PluralKit.Bot/obj/Debug/net5.0/PluralKit.Bot.GeneratedMSBuildEditorConfig.editorconfig'.
Project PluralKit.Bot is using configuration from '/home/spiral/.dotnet/sdk/5.0.400/Sdks/Microsoft.NET.Sdk/analyzers/build/config/AnalysisLevel_5_Default.editorconfig'.
Project PluralKit.Core is using configuration from '/home/spiral/sources/pluralkit/.editorconfig'.
Project PluralKit.Core is using configuration from '/home/spiral/sources/pluralkit/PluralKit.Core/obj/Debug/net5.0/PluralKit.Core.GeneratedMSBuildEditorConfig.editorconfig'.
Project PluralKit.Core is using configuration from '/home/spiral/.dotnet/sdk/5.0.400/Sdks/Microsoft.NET.Sdk/analyzers/build/config/AnalysisLevel_5_Default.editorconfig'.
Project PluralKit.API is using configuration from '/home/spiral/sources/pluralkit/.editorconfig'.
Project PluralKit.API is using configuration from '/home/spiral/sources/pluralkit/PluralKit.API/obj/Debug/net5.0/PluralKit.API.GeneratedMSBuildEditorConfig.editorconfig'.
Project PluralKit.API is using configuration from '/home/spiral/.dotnet/sdk/5.0.400/Sdks/Microsoft.NET.Sdk/analyzers/build/config/AnalysisLevel_5_Default.editorconfig'.
Project PluralKit.Tests is using configuration from '/home/spiral/sources/pluralkit/.editorconfig'.
Project PluralKit.Tests is using configuration from '/home/spiral/sources/pluralkit/PluralKit.Tests/obj/Debug/net5.0/PluralKit.Tests.GeneratedMSBuildEditorConfig.editorconfig'.
Project PluralKit.Tests is using configuration from '/home/spiral/.dotnet/sdk/5.0.400/Sdks/Microsoft.NET.Sdk/analyzers/build/config/AnalysisLevel_5_Default.editorconfig'.
Project Myriad is using configuration from '/home/spiral/sources/pluralkit/.editorconfig'.
Project Myriad is using configuration from '/home/spiral/sources/pluralkit/Myriad/obj/Debug/net5.0/Myriad.GeneratedMSBuildEditorConfig.editorconfig'.
Project Myriad is using configuration from '/home/spiral/.dotnet/sdk/5.0.400/Sdks/Microsoft.NET.Sdk/analyzers/build/config/AnalysisLevel_5_Default.editorconfig'.
Complete in 4845ms.
Determining formattable files.
Complete in 1144ms.
Running formatters.
Complete in 1146ms.
Formatted 0 of 309 files.
Format complete in 7138ms.
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.