docs(sidecar): put the measured read cost in the dismissal bound

This commit is contained in:
pj committed 2026-08-15 21:08:03 +05:30
1 parent f65bc1631c
commit 64f99babd5
1 file changed
+6 -4
@@ -809,10 +809,12 @@ internal fun dismissSoftKeyboard(shell: (String) -> String) {
} }
// KEYBOARD_DISMISS_READS bounds the re-reads a snapshot spends waiting for the // KEYBOARD_DISMISS_READS bounds the re-reads a snapshot spends waiting for the
// IME window to leave the tree after BACK. The window goes over an animation, // IME window to leave the tree after BACK. The window leaves over an
// so the first read back can still carry it; a hierarchy read plus the interval // animation, so the first read back can still carry it. A hierarchy read
// costs ~250ms on the emulator, which covers a retraction several times over // measures at a 76ms median and a 168ms p90 on the API 34 emulator, so with
// without turning a keyboard the app keeps re-raising into an unbounded wait. // the interval these four reads watch most of a second: several retractions
// over, without turning a keyboard the app keeps re-raising into a wait with
// no end.
internal const val KEYBOARD_DISMISS_READS = 4 internal const val KEYBOARD_DISMISS_READS = 4
internal const val KEYBOARD_DISMISS_INTERVAL_MILLIS = 100L internal const val KEYBOARD_DISMISS_INTERVAL_MILLIS = 100L