dotnet / dotnet/format

Slow performance for --include with single file

Open
#757 32 comments 52 reactions 0 assignees View on GitHub
Performance
Dominant language
No language data
Stars
1.9k
Forks
173
Avg merge
10d 13h
Merged PRs (30d)
1

Description

Hi,
I'm just experimenting with dotnet-format for the first time. I noticed that running it on a single file has more overhead than I would expect.

```
# Run on 223 files
$ git ls-files | grep .cs$ > all_cs.txt
$ dotnet format --folder --include @all_cs.txt
Formatting code files in workspace '/xyz/ml-agents'.
...
Format complete in 2297ms.

# Run on 1 file
$ dotnet format --folder --include com.unity.ml-agents/Tests/Editor/MultinomialTest.cs
Formatting code files in workspace '/xyz/ml-agents'.
Format complete in 1325ms.
```
Is that expected? It's not horrible, but it would be mildly annoying to run incrementally on git commits.

Platform/version information:
MacOS 10.14.6
```
$ dotnet --version
3.1.401
$ dotnet-format --version
4.1.131201+82a5527cd93d66bffc885c0bb901499f5981db35
```

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.