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

  1. Run gdk config set gdk.debug false (in case you have it set to true)
  2. Run rake gdk-config.mk
  3. Run gdk config set gdk.debug true
  4. Run cat gdk-config.mk | grep gdk_debug
  5. See that it is gdk_debug = false
  6. Run gdk reconfigure
  7. While that is running, run cat gdk-config.mk | grep gdk_debug again
  8. See that it is gdk_debug = true now

Impacted categories

The following categories relate to this merge request:

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.

Merge request reports

Loading