fix(RAM: view ram in settings): report native ORG2 app footprint accurately - #451
Merged
Merged
Conversation
Replace descendant RSS totals with a versioned native memory snapshot so Sidebar and Settings report the same product boundary. Measure the ORG2 backend and only WebView helpers whose ownership can be established safely, while keeping terminal, CLI agent, MCP, and tool processes as separate diagnostics. Use macOS physical footprint with process-scoped WebKit attribution and Windows Private Working Set or Private Bytes with conservative fallbacks. Share one atomic frontend poller, remove the legacy child-process heuristic, and keep partial attribution internal instead of showing a warning banner. Verification: - pnpm run lint - pnpm run check:circular - pnpm typecheck - pnpm exec vitest run --silent --reporter=dot (504 files, 5370 tests) - cargo test -p perf_utils (68 passed) - cargo test --lib (944 passed, 1 ignored) - cargo check -p org2 --lib - strict Clippy for changed leaf crates - full-workspace all-target Clippy attempted; blocked by pre-existing warnings - macOS live footprint comparison and Windows API subset cross-compile Pre-commit hook ran. Total eslint: 0, total circular: 0
Neonforge98
pushed a commit
that referenced
this pull request
Jul 30, 2026
…metrics fix(RAM: view ram in settings): report native ORG2 app footprint accurately
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
fixed #435.
origin/developbefore delivery.Root cause
The previous implementation summed RSS across descendant processes.
RSS is not equivalent to the native memory value shown by macOS Activity Monitor or Windows Task Manager. It can include shared and mapped pages, and process-tree ancestry alone is not strong enough to prove that every WebKit helper belongs to ORG2. This could produce inflated totals, include unrelated processes, or retain incorrect ownership after PID reuse.
Sidebar and Settings also performed separate measurements, which allowed the two views to display different snapshots.
Behavior after this change
Test plan
pnpm run lintpnpm run check:circularpnpm typecheckcargo test -p perf_utils: 68 passedcargo test --lib: 944 passed, 1 network-auth test ignoredcargo check -p org2 --libfootprint/vmmapSubmit checklist