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 /docs/RPC.md | |
| 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 '')
| -rw-r--r-- | docs/RPC.md | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/docs/RPC.md b/docs/RPC.md index e8dc76b..9472854 100644 --- a/docs/RPC.md +++ b/docs/RPC.md @@ -82,9 +82,14 @@ stalls. `target` is a name, `0xADDR`, or omitted (= current function). ### Semantic verbs High-level ops type through the **real prompts** with a per-char delay -(`delay_ms`, default 35ms) so viewers see it typed; each settles on an op-specific +(`delay_ms`, default 20ms) so viewers see it typed; each settles on an op-specific predicate so the returned state is final. +`delay_ms` is the *whole* per-key cost: injected keys skip Textual's +`wait_for_idle` heuristic (`rpc.py: press()`), which used to add ~80ms to every +character no matter what the driver asked for. So `delay_ms=0` really is instant +(~1ms/char), and a raised delay buys exactly the pace it names. + | method | params | effect | |--------|--------|--------| | `goto` / `open` | `target`, `delay_ms?`, `timeout?` | `g` prompt → name or `0xADDR` → Enter. | |
