diff options
| author | Chris Frost <chris.frost@stellar.org> | 2026-07-08 06:57:51 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-07-08 15:57:51 +0200 |
| commit | c632605c360f333324ef42dd9b6524cd4328884c (patch) | |
| tree | 57ecea2a04f0b6c3ae8bef5a1ad8153318ecac8c /zellij-integration-tests/tests/snapshots/resize__resize_decrease_right.snap | |
| parent | Stacked list fixes (#5342) (diff) | |
| download | sl0ppij-c632605c360f333324ef42dd9b6524cd4328884c.tar.gz sl0ppij-c632605c360f333324ef42dd9b6524cd4328884c.tar.xz sl0ppij-c632605c360f333324ef42dd9b6524cd4328884c.zip | |
perf: foreground pane-command discovery without scanning the whole process table (#5324)
* build(deps): bump sysinfo to 0.37 for scan-free partial process refresh
Bump it to pull in sysinfo 0.37's change "Linux: greatly improve partial
processes retrieval", so that refreshing a specific set of pids
(ProcessesToUpdate::Some) no longer walks the entire /proc tree.
This makes the existing get_cwd/get_cwds polling O(panes) instead of
O(host processes) and unblocks doing the same for foreground-command discovery.
* perf: discover foreground pane commands w/o scanning all processes
Foreground command discovery was reading information about every process
on the host, on each pane/tab creation and on every periodic poll. On hosts
with many processes (eg, 50k) this stalled pane creation for tens of seconds
and overran the action-completion timeout.
Replace that O(host processes) lookup with an O(panes) lookup. Instead
of looking up the parent pid of every process to find the child, get
the foreground process-group leader's pid from a call to tcgetpgrp on
the pane's controlling terminal. When the leader is the shell itself
(idle prompt or a command sharing the shell's group without job control)
the pane is omitted and the caller falls back to the shell command,
matching prior behavior; with job control on it now reports the true
foreground job instead of possibly a background one.
This changes the paths for Linux, macOS, and BSD. It leaves Windows unchanged.
* refactor(os_input): extract apply_post_command_hook helper
The command -> run_command_hook -> trim/split pipeline was duplicated between
the #[cfg(not(unix))] get_all_cmds_by_ppid and the unix get_foreground_cmds.
Extract a single apply_post_command_hook helper and call it from both sites,
routing the hook-failure fallback through the project's non_fatal() logging
idiom (CONTRIBUTING.md "Logging errors") instead of log::error!.
* review: simplify tcgetpgrp locking, trim comments, drop changelog entries
- Remove the lock-drop dance and its TOCTOU caveat from tcgetpgrp,
to make it mirror tcdrain
- Prune AI comments
- Remove CHANGELOG entries
Diffstat (limited to 'zellij-integration-tests/tests/snapshots/resize__resize_decrease_right.snap')
0 files changed, 0 insertions, 0 deletions
