S062: memory saver measured: web processes and PSS drop after unload

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
This commit is contained in:
astar76 2026-11-18 05:01:55 -06:00
commit bf29afb90f

View file

@ -495,7 +495,8 @@ Later: S010 list: user checks the Discord icon with their own client (the Discor
- Strip: unloaded tab = favicon at 45 % + tooltip "Unloaded to save memory"; frozen = 70 % + "Resting in the background"; back to full when shown.
- Settings: Memory saver slider Off/5 min/15/30/1 h/2 h/4 h, Freeze slider Never/1/2/5/10/15/30/60 min (snapping, stored in `discard_min`/`freeze_min`); labels in the row text.
- `NACRE_REST_UNIT_SECS` makes a rest "minute" shorter (smoke only). Test: `tab_rest_minutes` ranges; `tests/smoke/rest.txt` (`NACRE_REST_UNIT_SECS=2`) exit 0. `cargo test` 89 + webext 1.
- Not done: PSS drop after unload not measured here (`integ-perf.txt` has the memory numbers); no visible run.
- Measured (hidden, 5 http tabs, tab 0 active, `NACRE_REST_UNIT_SECS=2`, discard 4 = 8 s; WebKitWebProcess of that run, summed `smaps_rollup` Pss, sampled every 2 s): all tabs open 15 processes / 774 MB; ~10 s after the hidden four unloaded 6 processes / 329 MB, settling at 295 MB. Unloading frees the web processes and their memory (no shared process or lingering view ref found); the 6 left include the active tab's and WebKit's spare ones. Both `has_web` expects false.
- Not done: no visible run.
## Later
- A link followed inside a frame still goes through the tab's navigation policy (WebKit's GTK API has no frame info; S050).