diff options
| author | blasty <peter@haxx.in> | 2026-09-29 14:31:36 +0200 |
|---|---|---|
| committer | blasty <peter@haxx.in> | 2026-09-29 14:31:36 +0200 |
| commit | 29c529796b612b3d390a7f8ed6f83269fd88c67e (patch) | |
| tree | 2016da1bfdaee1e820dfe9781b2613f91a9ef082 /.githooks/pre-commit | |
| parent | Put a spawned pane beside US, not beside whoever is looking (diff) | |
| download | ida-tui-29c529796b612b3d390a7f8ed6f83269fd88c67e.tar.gz ida-tui-29c529796b612b3d390a7f8ed6f83269fd88c67e.tar.xz ida-tui-29c529796b612b3d390a7f8ed6f83269fd88c67e.zip | |
Type at the speed the driver asked for
`App._press_keys` waits on Textual's `wait_for_idle` twice per key -- a
CPU-load heuristic that sleeps in 20ms granules until process time stops
advancing. Measured through the RPC server on a real pty that is ~80ms
per character, so `delay_ms=35` typed at ~115ms/char (a third of the pace
it named) and `delay_ms=0` -- what `idatui.drive` asks for, and what an
agent wants -- was no faster than a slow human.
`press()` swaps the heuristic for a bare yield while our keys go in, the
same trade tests/_fixtures.fast_keys already makes. What replaces it is
not "nothing": every verb ends in settle() (pump drained, threaded
workers finished), which is the real gate and strictly stronger than "the
CPU looks idle", and `wait:<ms>` tokens still sleep for real so a delay
that was asked for still renders frame by frame. It patches around the
call rather than at import, so nothing else -- the pilot suite in
particular -- changes behaviour if this module is imported there.
With the floor gone, the default delay is the whole cost of a keystroke,
which makes 35 dishonest as well as slow: TYPE_DELAY_MS is 20 (~50
chars/second, still visibly typed). docs/RPC.md says what delay_ms now
means, since "0 is instant" only became true here.
Also moves the last two `client.invoke("name", ...)` call sites in this
file to `client.call(remote_ops.name, ...)`, which is what the rest of
the tree uses since the ida-nexus port: the operation is a reference, not
a string nobody checks.
Diffstat (limited to '.githooks/pre-commit')
0 files changed, 0 insertions, 0 deletions
