microsoft / parallel-prettier

Concurrent prettier runner
MIT License
197 stars 18 forks source link

No performance gain #26

Open thernstig opened 9 months ago

thernstig commented 9 months ago

There is almost no performance improvement with --check. Tested using hyperfine, running on 32 cores.

> hyperfine --runs 2 'pprettier --check "**/*.{css,html,js,json,jsonc,ts,yaml}"' 'prettier --check "**/*.{css,html,js,json,jsonc,ts,yaml}"'
Benchmark #1: pprettier --check "**/*.{css,html,js,json,jsonc,ts,yaml}"
  Time (mean ± σ):     30.887 s ±  0.266 s    [User: 41.467 s, System: 5.283 s]
  Range (min … max):   30.699 s … 31.075 s    2 runs

Benchmark #2: prettier --check "**/*.{css,html,js,json,jsonc,ts,yaml}"
  Time (mean ± σ):     35.826 s ±  0.070 s    [User: 56.416 s, System: 2.453 s]
  Range (min … max):   35.777 s … 35.875 s    2 runs

Summary
  'pprettier --check "**/*.{css,html,js,json,jsonc,ts,yaml}"' ran
    1.16 ± 0.01 times faster than 'prettier --check "**/*.{css,html,js,json,jsonc,ts,yaml}"'

@mixer/parallel-prettier version 2.0.3 / prettier version 2.8.3