retooted Ivan Molodetskikh
@AdrianVovk bringing back this thread: there's some ongoing work in niri, so I did a few benchmarks.
https://github.com/niri-wm/niri/pull/3482#issuecomment-6854452386
At the first glance, waiting for StartTransientUnit to complete before exec()ing isn't too bad: 1.5 ms ⇒ 3.3 ms desktop, 2 ms ⇒ 3.8 ms laptop (95th perc.). First is exec right away then try to create scope, second is create scope, wait, exec.
But then I unplugged the laptop's charger... and the benchmark showed 3.3 ms ⇒ 20 ms (p95). Oof.