only show parent level processes on main tui
CI / build (ubuntu-latest) (push) Has been cancelled
CI / build (windows-latest) (push) Has been cancelled

This commit is contained in:
2026-06-01 10:55:29 -07:00
parent 0ec428d86f
commit 09cfafb8d4
+7 -1
View File
@@ -649,12 +649,18 @@ pub async fn collect_processes_all(state: &AppState) -> ProcessesPayload {
// to gather CPU/exe/cmd/cwd/env per process is wasted /proc traffic on a Pi // to gather CPU/exe/cmd/cwd/env per process is wasted /proc traffic on a Pi
// (was reading /proc/{pid}/{cmdline,exe,cwd,environ,io,status} for every PID // (was reading /proc/{pid}/{cmdline,exe,cwd,environ,io,status} for every PID
// on every 2 s poll via `everything()`). // on every 2 s poll via `everything()`).
//
// `without_tasks()` is REQUIRED: it suppresses per-thread entries in the
// process map (without it, sysinfo returns one entry per /proc/[tid] —
// 780+ entries on a typical desktop because of glib/gdbus/Chrome thread
// pools). The original code paired this with `everything()`; we keep the
// filter when downgrading to a minimal refresh spec.
let mut sys_guard = state.sys.lock().await; let mut sys_guard = state.sys.lock().await;
let sys = &mut *sys_guard; let sys = &mut *sys_guard;
sys.refresh_processes_specifics( sys.refresh_processes_specifics(
ProcessesToUpdate::All, ProcessesToUpdate::All,
false, false,
ProcessRefreshKind::nothing().with_memory(), ProcessRefreshKind::nothing().with_memory().without_tasks(),
); );
let total_count = sys.processes().len(); let total_count = sys.processes().len();