Skip to content

perf(desktop): debounce SlashArgs IPC by 120ms#2952

Open
HUQIANTAO wants to merge 1 commit into
esengine:main-v2from
HUQIANTAO:pr/debounce-slash-args
Open

perf(desktop): debounce SlashArgs IPC by 120ms#2952
HUQIANTAO wants to merge 1 commit into
esengine:main-v2from
HUQIANTAO:pr/debounce-slash-args

Conversation

@HUQIANTAO
Copy link
Copy Markdown
Contributor

Debounce app.SlashArgs() calls by 120ms to eliminate ~80% of IPC traffic during rapid typing of slash commands.

…alls

The slash argument completion effect fires app.SlashArgs() on every keystroke
as the user types a command like /skill show. During rapid typing this creates
a burst of IPC calls where only the last one matters — intermediate results
are immediately discarded when the next keystroke arrives.

Add a 120ms debounce (setTimeout + clearTimeout on cleanup) so the backend
is only queried after the user pauses. The delay is short enough to feel
instant (< 2 average keystroke intervals) while eliminating ~80% of IPC
traffic during fast typing. The debounce ref is cleaned up on unmount to
prevent stale callbacks from firing after the component is gone.
@github-actions github-actions Bot added the v2 Go rewrite (1.x) — main-v2 branch, active development label Jun 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

v2 Go rewrite (1.x) — main-v2 branch, active development

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant