Precompile gitlab-workhorse
What does this merge request do and why?
This MR adds support for precompiled gitlab-workhorse binaries.
Related to #2127 (closed)
Performance
On my M3 MacBook, it’s about 12 times faster to just check if we have to redownload again. At my 100 MBit/s download, it takes about 14s to download, which is still 40% faster than compiling here (probably much faster on lower-end devices) and should only run whenever we update our precompiled binaries.
Benchmark 1: make gitlab-workhorse-update-run
Time (mean ± σ): 1.649 s ± 0.158 s [User: 0.529 s, System: 0.237 s]
Range (min … max): 1.357 s … 1.799 s 10 runs
Benchmark 2: make gitlab-workhorse-update-run-old
Time (mean ± σ): 20.673 s ± 0.402 s [User: 9.647 s, System: 23.004 s]
Range (min … max): 20.174 s … 21.514 s 10 runs
Summary
make gitlab-workhorse-update-run ran
12.54 ± 1.23 times faster than make gitlab-workhorse-update-run-old
How to set up and validate locally
By default, you can just run GDK_SELF_UPDATE=0 gdk update
and it will download the precompiled binary if it’s available for your platform. If not, it’ll fall back to compiling locally.
- Run
gdk download-precompiled
- See that files are being downloaded
- Run
gdk download-precompiled
- See that all files are up to date
- Rerun the
precompile:gitlab-workhorse
job - Run
gdk download-precompiled
- See that files are being downloaded again
Impacted categories
The following categories relate to this merge request:
-
gdk-reliability - e.g. When a GDK action fails to complete. -
gdk-usability - e.g. Improvements or suggestions around how the GDK functions. -
gdk-performance - e.g. When a GDK action is slow or times out.
Merge request checklist
-
This change is backward compatible. If not, please include steps to communicate to our users. -
Tests added for new functionality. If not, please raise an issue to follow-up. -
Documentation added/updated, if needed. -
Announcement added, if change is notable. -
gdk doctor
test added, if needed. -
Add the ~highlight
label if this MR should be included in theCHANGELOG.md
.
Edited by Kev Kloss