diff options
| author | Matt Hunter <m@lfurio.us> | 2026-05-08 03:56:20 -0400 |
|---|---|---|
| committer | Matt Hunter <m@lfurio.us> | 2026-05-08 03:56:20 -0400 |
| commit | 4b9e1e9828892b3c18afb015c9a1a706a9bc5dce (patch) | |
| tree | df7212b7572a545b9666928c37fdb1daf8b6e6a7 /git-radar | |
| parent | 5f7de1d0b89d9d5cc6f437061a62e38721077667 (diff) | |
| parent | f6828ce72ccf6b17220da77177a2015cec770523 (diff) | |
| download | git-sonar-master.tar.gz git-sonar-master.zip | |
The recent script rewrite of git-sonar resulted in average runtimes 4-5x
higher than the latest release (v0.8.1), and was slower than some
previous releases of git-radar as well. Change milestones for the next
release are nearing completion, so lets take a moment and explore
possible performance improvements to the script. These patches are the
low (ish) hanging fruit.
The performance curve is improved on the whole, but the script is still
marginally slower when operating at smaller scale - that is, in a
smaller repo with little or no "changes" for the prompt to report.
"Changes" in this case refers to the number of commits in the compared
ranges, or the number of paths affected by changes staged, unstaged,
etc.
I consider the low scale case to be the common case, so it annoys me a
little that I haven't improved this case over previous releases.
However, at scale, the difference in runtime can become quite pronounced
in favor of this version over the past few releases (nevermind the
rewrite).
Of course, these aren't apples to apples comparisons, as features have
come and gone between releases. Though the most expensive operations
have more-or-less remained a constant.
Tests were benchmarked using a clone of the linux-stable tree, with
changes ranging up to 2000 changed paths, or commits out-of-date.
* perf:
Remove unneeded option --symbolic-full-name for upstream_name
Remove outer grep in prepare_element for speedup
Use faster command to obtain stash count
Revert status output to a single prompt element
Diffstat (limited to 'git-radar')
0 files changed, 0 insertions, 0 deletions
