Skip gdk-config.yml generation in reconfigure
What does this merge request do and why?
This skips make calling 'rake gdk-config.yml' on every call and instead generates it once initially. This saves us about 500ms on each call to make, which accumulates to a total 'gdk reconfigure' duration improvement of about 21% (M3 Max Mac: 31s to 26s, delta 5s).
Benchmark
uwu$ hyperfine --warmup 1 'gdk reconfigure' 'SKIP_GENERATE_GDK_CONFIG_MK=1 gdk reconfigure'
Benchmark 1: gdk reconfigure
Time (mean ± σ): 31.375 s ± 0.475 s [User: 19.159 s, System: 39.135 s]
Range (min … max): 30.968 s … 32.476 s 10 runs
Benchmark 2: SKIP_GENERATE_GDK_CONFIG_MK=1 gdk reconfigure
Time (mean ± σ): 25.945 s ± 0.320 s [User: 4.969 s, System: 4.642 s]
Range (min … max): 25.559 s … 26.612 s 10 runs
Summary
SKIP_GENERATE_GDK_CONFIG_MK=1 gdk reconfigure ran
1.21 ± 0.02 times faster than gdk reconfigure
How to set up and validate locally
- Run
gdk config set gdk.debug false(in case you have it set totrue) - Run
rake gdk-config.mk - Run
gdk config set gdk.debug true - Run
cat gdk-config.mk | grep gdk_debug - See that it is
gdk_debug = false - Run
gdk reconfigure -
While that is running, run
cat gdk-config.mk | grep gdk_debugagain - See that it is
gdk_debug = truenow
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 doctortest added, if needed.