powerful-florist-1807
09/01/2023, 8:59 PMenough-analyst-54434
09/01/2023, 9:04 PM./pants roots
by hand in each version does not track the delta when run via that script?powerful-florist-1807
09/01/2023, 9:09 PMenough-analyst-54434
09/01/2023, 9:24 PM$ hyperfine -w2 'cd /tmp/mingshi/2.14.0 && ./pants roots' 'cd /tmp/mingshi/2.17.0 && ./pants roots'
Benchmark 1: cd /tmp/mingshi/2.14.0 && ./pants roots
Time (mean ± σ): 499.4 ms ± 2.4 ms [User: 435.0 ms, System: 33.3 ms]
Range (min … max): 495.0 ms … 503.3 ms 10 runs
Benchmark 2: cd /tmp/mingshi/2.17.0 && ./pants roots
Time (mean ± σ): 580.8 ms ± 5.5 ms [User: 511.6 ms, System: 26.1 ms]
Range (min … max): 573.8 ms … 592.3 ms 10 runs
Summary
'cd /tmp/mingshi/2.14.0 && ./pants roots' ran
1.16 ± 0.01 times faster than 'cd /tmp/mingshi/2.17.0 && ./pants roots'
Scripted Pants 14+/-2% slower:
$ hyperfine -w2 'cd /tmp/mingshi/2.14.0 && /tmp/mingshi/cmd.venv/bin/python /tmp/mingshi/cmd.py -- run-pants-cmd' 'cd /tmp/mingshi/2.17.0 && /tmp/mingshi/cmd.venv/bin/python /tmp/mingshi/cmd.py -- run-pants-cmd'
Benchmark 1: cd /tmp/mingshi/2.14.0 && /tmp/mingshi/cmd.venv/bin/python /tmp/mingshi/cmd.py -- run-pants-cmd
Time (mean ± σ): 535.9 ms ± 7.7 ms [User: 467.6 ms, System: 36.2 ms]
Range (min … max): 527.1 ms … 549.2 ms 10 runs
Benchmark 2: cd /tmp/mingshi/2.17.0 && /tmp/mingshi/cmd.venv/bin/python /tmp/mingshi/cmd.py -- run-pants-cmd
Time (mean ± σ): 611.7 ms ± 5.3 ms [User: 540.5 ms, System: 28.0 ms]
Range (min … max): 606.4 ms … 624.0 ms 10 runs
Summary
'cd /tmp/mingshi/2.14.0 && /tmp/mingshi/cmd.venv/bin/python /tmp/mingshi/cmd.py -- run-pants-cmd' ran
1.14 ± 0.02 times faster than 'cd /tmp/mingshi/2.17.0 && /tmp/mingshi/cmd.venv/bin/python /tmp/mingshi/cmd.py -- run-pants-cmd'
enough-analyst-54434
09/01/2023, 9:24 PM./pants roots
got slower and you have many roots? But even then, my experiment seems to indicate that using Pants directly and using from a script has little effect on speed in either version.enough-analyst-54434
09/01/2023, 9:25 PMpowerful-florist-1807
09/01/2023, 9:27 PMenough-analyst-54434
09/01/2023, 9:30 PMenough-analyst-54434
09/01/2023, 9:33 PM$ hyperfine -w2 'cd /tmp/mingshi/2.14.0 && ./pants roots' 'cd /tmp/mingshi/2.17.0 && ./pants roots' 'cd /tmp/mingshi/2.14.0 && ./pants --no-pantsd roots' 'cd /tmp/mingshi/2.17.0 && ./pants --no-pantsd roots'
Benchmark 1: cd /tmp/mingshi/2.14.0 && ./pants roots
Time (mean ± σ): 522.0 ms ± 62.0 ms [User: 435.9 ms, System: 34.4 ms]
Range (min … max): 490.3 ms … 697.8 ms 10 runs
Warning: Statistical outliers were detected. Consider re-running this benchmark on a quiet PC without any interferences from other programs. It might help to use the '--warmup' or '--prepare' options.
Benchmark 2: cd /tmp/mingshi/2.17.0 && ./pants roots
Time (mean ± σ): 577.4 ms ± 6.4 ms [User: 506.0 ms, System: 28.5 ms]
Range (min … max): 567.4 ms … 588.2 ms 10 runs
Benchmark 3: cd /tmp/mingshi/2.14.0 && ./pants --no-pantsd roots
Time (mean ± σ): 1.037 s ± 0.017 s [User: 0.952 s, System: 0.038 s]
Range (min … max): 1.016 s … 1.067 s 10 runs
Benchmark 4: cd /tmp/mingshi/2.17.0 && ./pants --no-pantsd roots
Time (mean ± σ): 4.606 s ± 0.064 s [User: 4.479 s, System: 0.095 s]
Range (min … max): 4.551 s … 4.758 s 10 runs
Summary
'cd /tmp/mingshi/2.14.0 && ./pants roots' ran
1.11 ± 0.13 times faster than 'cd /tmp/mingshi/2.17.0 && ./pants roots'
1.99 ± 0.24 times faster than 'cd /tmp/mingshi/2.14.0 && ./pants --no-pantsd roots'
8.82 ± 1.06 times faster than 'cd /tmp/mingshi/2.17.0 && ./pants --no-pantsd roots'
As you can see, Pants 2.14 perf without the daemon is bad (2x slower than with), but Pants 2.17 perf without the daemon is horrible (8x slower than with).enough-analyst-54434
09/01/2023, 9:34 PMpowerful-florist-1807
09/01/2023, 10:11 PMpowerful-florist-1807
09/01/2023, 10:19 PMpants run ci_runner.py ...
which is why it makes CI very slow.powerful-florist-1807
09/01/2023, 10:20 PMenough-analyst-54434
09/01/2023, 10:33 PMPANTS_CONCURRENT=True
disables pantsd by design. Maybe that wasn't true in 2.14.0? I think it was though.enough-analyst-54434
09/01/2023, 10:34 PMenough-analyst-54434
09/01/2023, 10:35 PMPANTS_CONCURRENT=True
to still use pantsd: https://github.com/pantsbuild/pants/issues/7654powerful-florist-1807
09/01/2023, 10:43 PMenough-analyst-54434
09/01/2023, 10:47 PMenough-analyst-54434
09/01/2023, 10:47 PM