Filip131311
0b545c3c49
perf(flows): wait for the launched app to draw instead of sleeping 1.5s
...
Every `launch:` step slept a flat POST_LAUNCH_SETTLE_MS (1500ms) before the
run's first step, to give a cold start a head start. `restart-app` already
waits for the activity to be displayed (`am start -W`), so on any app that is
already drawing, that whole window was dead time.
The condition the sleep approximated is observable: the flow's own tree source
either shows the app's content or it does not. Poll it instead, with the same
1500ms as an upper bound — a warm app continues after one read, a genuinely
slow start still gets the full window.
The wait stays deliberately forgiving, so nothing that passed before can start
failing: a tree that never fills (a canvas or video first screen), or a read
that throws, spends the budget and carries on exactly as the sleep did. The
tree-source gate still runs first and is still what reports an unusable
source; this is a head start, not a gate.
Measured on an Android emulator (Pixel 9 API 35), 6-step flow against a fast
app, runs interleaved with the released build to cancel out host-load drift:
baseline (sleep) 6.72s 6.79s 6.68s
this change 5.27s 5.39s 5.07s
~1.45s saved per launch, i.e. the sleep minus the ~50-100ms the first tree
read costs. Same on iOS by construction; the win is per `launch:` step, so a
flow that relaunches several times saves a multiple of it.
2026-08-12 12:23:52 +02:00
..
2026-07-12 13:42:23 +02:00
2026-08-10 11:51:45 +02:00
2026-08-10 11:51:45 +02:00
2026-07-07 10:05:42 +02:00
2026-08-12 12:23:52 +02:00
2026-08-10 10:54:58 +02:00
2026-08-11 17:10:28 +02:00
2026-06-25 13:29:10 +02:00
2026-08-11 15:37:28 +02:00
2026-07-13 17:15:01 +02:00
2026-07-15 07:55:31 +02:00
2026-08-10 11:51:45 +02:00
2026-07-01 14:59:37 +02:00
2026-05-11 11:39:10 +02:00
2026-05-27 16:24:31 +02:00
2026-07-22 13:53:32 +02:00
2026-05-12 14:21:09 +02:00
2026-06-22 20:31:45 +02:00
2026-07-22 13:53:32 +02:00
2026-06-03 17:14:35 +02:00
2026-05-12 14:21:09 +02:00
2026-07-01 14:59:37 +02:00
2026-07-03 16:19:23 +02:00
2026-07-10 12:51:24 +02:00
2026-07-07 16:29:22 +02:00
2026-07-01 14:59:37 +02:00
2026-06-16 15:46:41 +02:00
2026-05-27 16:24:31 +02:00
2026-07-13 17:15:01 +02:00
2026-07-15 08:07:03 +02:00
2026-07-22 16:56:54 +02:00
2026-05-27 16:24:07 +02:00
2026-06-03 22:23:29 +02:00
2026-05-27 16:24:07 +02:00
2026-06-22 20:31:45 +02:00
2026-07-08 17:22:31 +02:00
2026-08-06 07:28:27 +02:00
2026-08-06 07:28:27 +02:00
2026-08-06 07:28:27 +02:00
2026-07-10 12:51:24 +02:00
2026-05-11 11:39:10 +02:00
2026-06-15 14:32:06 +02:00
2026-07-22 13:53:32 +02:00
2026-06-15 11:03:23 +02:00
2026-07-31 15:36:36 +02:00
2026-06-15 15:31:51 +02:00
2026-06-15 11:03:23 +02:00
2026-06-15 11:03:23 +02:00
2026-06-15 11:03:23 +02:00
2026-06-15 11:03:23 +02:00
2026-06-15 11:03:23 +02:00
2026-08-10 10:54:58 +02:00
2026-06-17 12:20:55 +02:00
2026-07-02 16:42:10 +02:00
2026-07-13 17:15:01 +02:00
2026-06-15 11:03:23 +02:00
2026-06-15 11:03:23 +02:00
2026-06-15 11:03:23 +02:00
2026-06-17 12:20:55 +02:00
2026-06-15 15:57:45 +02:00
2026-08-03 11:09:11 +02:00
2026-07-31 15:36:36 +02:00
2026-06-25 21:16:03 +02:00
2026-07-22 13:53:32 +02:00
2026-07-06 17:12:20 +02:00
2026-07-03 16:19:16 +02:00
2026-05-11 11:39:10 +02:00
2026-07-13 17:15:01 +02:00
2026-04-28 15:32:39 +02:00
2026-05-27 11:46:12 +02:00
2026-07-13 17:15:01 +02:00
2026-05-26 10:07:04 +02:00
2026-05-11 11:39:10 +02:00
2026-07-10 12:51:05 +02:00
2026-07-01 14:59:37 +02:00
2026-06-22 20:31:45 +02:00
2026-07-22 13:53:32 +02:00
2026-07-07 13:36:27 +02:00
2026-07-10 11:52:28 +02:00
2026-08-10 10:54:58 +02:00
2026-07-10 12:29:48 +02:00
2026-08-05 14:51:42 +02:00
2026-06-19 18:22:34 +02:00
2026-04-28 15:15:03 +02:00
2026-07-23 07:44:26 +02:00
2026-07-24 13:18:23 +02:00
2026-07-10 12:29:48 +02:00
2026-08-10 11:51:45 +02:00
2026-08-10 10:54:58 +02:00
2026-06-03 17:44:15 +02:00
2026-08-10 11:51:45 +02:00
2026-07-23 21:14:37 +02:00
2026-08-10 17:09:16 +02:00
2026-08-10 10:54:58 +02:00
2026-06-01 17:15:12 +02:00
2026-07-10 12:29:48 +02:00
2026-06-17 12:20:55 +02:00
2026-08-10 17:09:16 +02:00
2026-07-31 15:14:03 +02:00
2026-07-07 16:29:22 +02:00
2026-07-12 13:42:23 +02:00
2026-07-13 17:15:01 +02:00
2026-07-20 19:26:33 +02:00
2026-07-10 12:51:24 +02:00
2026-07-10 12:51:24 +02:00
2026-07-14 08:31:50 +02:00
2026-08-04 15:23:12 +02:00
2026-07-10 12:51:05 +02:00
2026-07-22 13:53:32 +02:00
2026-07-01 19:57:56 +02:00
2026-07-13 16:56:49 +02:00
2026-07-01 19:57:56 +02:00
2026-06-25 13:29:10 +02:00
2026-07-01 11:02:33 +02:00
2026-07-20 17:05:16 +02:00
2026-06-24 11:22:57 +02:00
2026-07-13 17:15:01 +02:00
2026-07-13 17:15:01 +02:00
2026-07-23 21:14:37 +02:00
2026-04-07 17:36:56 +02:00
2026-04-16 00:16:10 +02:00
2026-07-21 10:28:14 +02:00
2026-07-10 12:51:05 +02:00
2026-08-10 10:54:58 +02:00
2026-07-03 16:45:29 +02:00
2026-07-03 16:45:29 +02:00
2026-07-03 16:45:29 +02:00
2026-07-31 15:14:03 +02:00
2026-08-10 10:54:58 +02:00
2026-08-10 10:54:58 +02:00
2026-08-10 10:54:58 +02:00
2026-08-10 10:54:58 +02:00
2026-08-10 10:54:58 +02:00
2026-06-16 14:58:22 +02:00
2026-06-01 15:04:25 +02:00
2026-07-21 16:56:31 +02:00
2026-07-01 19:57:56 +02:00
2026-07-01 19:57:56 +02:00
2026-07-01 19:57:56 +02:00
2026-07-13 16:56:49 +02:00
2026-07-01 19:57:56 +02:00
2026-06-24 11:22:57 +02:00
2026-07-07 13:36:27 +02:00
2026-07-22 16:56:54 +02:00
2026-07-12 13:42:23 +02:00
2026-08-11 17:18:11 +02:00
2026-07-12 13:42:23 +02:00
2026-07-03 16:19:31 +02:00
2026-08-10 10:54:58 +02:00
2026-07-02 17:37:30 +02:00
2026-07-01 14:59:37 +02:00
2026-08-10 10:54:58 +02:00
2026-07-02 12:40:19 +02:00
2026-06-03 22:28:20 +02:00
2026-06-01 15:04:25 +02:00
2026-07-01 14:59:37 +02:00
2026-08-03 11:16:29 +02:00
2026-07-01 14:59:37 +02:00
2026-07-01 14:59:37 +02:00
2026-07-13 22:45:06 +02:00
2026-07-22 08:47:52 +02:00
2026-06-24 21:00:54 +02:00
2026-07-31 15:14:03 +02:00
2026-06-17 12:20:55 +02:00
2026-07-13 22:16:33 +02:00
2026-07-13 17:15:01 +02:00
2026-07-22 13:53:32 +02:00
2026-08-10 10:54:58 +02:00
2026-06-24 14:03:57 +02:00
2026-06-01 15:04:25 +02:00
2026-08-10 11:51:45 +02:00
2026-07-07 16:29:22 +02:00
2026-07-01 14:59:37 +02:00
2026-07-01 14:59:37 +02:00
2026-05-12 14:21:09 +02:00
2026-07-03 16:19:16 +02:00
2026-07-08 12:24:19 +02:00
2026-06-01 18:29:16 +02:00
2026-06-17 15:22:04 +02:00
2026-07-13 16:56:49 +02:00
2026-07-03 16:19:29 +02:00
2026-07-03 16:19:29 +02:00
2026-07-03 16:19:29 +02:00
2026-07-01 11:02:33 +02:00
2026-06-22 20:31:45 +02:00
2026-06-22 20:31:45 +02:00
2026-07-01 11:02:33 +02:00
2026-06-22 20:31:45 +02:00
2026-06-22 20:31:45 +02:00
2026-06-22 20:31:45 +02:00
2026-06-22 20:31:45 +02:00
2026-06-22 20:31:45 +02:00
2026-06-22 20:31:45 +02:00
2026-06-22 20:31:45 +02:00
2026-06-22 20:31:45 +02:00
2026-07-20 17:05:16 +02:00
2026-06-22 20:31:45 +02:00
2026-06-22 20:31:45 +02:00
2026-06-22 20:31:45 +02:00
2026-07-07 10:05:42 +02:00
2026-06-26 16:40:27 +02:00
2026-07-23 21:14:37 +02:00
2026-05-11 11:39:10 +02:00
2026-06-25 13:29:10 +02:00