Fix memory growth issue in the Processes detail view - #4
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR addresses renderer memory growth in the Processes detail view by bounding how many per-process detail histories are retained in memory, evicting inactive histories over time, while keeping recent histories responsive when revisited. It also updates the README to include a demo video link.
Changes:
- Add a bounded “recently viewed” cache for process detail histories (count limit + inactivity TTL) and prune associated side caches (access timestamps, sampled revisions, frozen buffers).
- Adjust detail history sampling to avoid resampling the same snapshot revision per key and to buffer ticks only for the actively inspected detail while frozen.
- Add a demo video link to
README.md.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
src/renderer/components/processes/use-process-histories.ts |
Implements bounded retention + pruning policy for process detail history trails and related caches to prevent unbounded memory growth. |
src/renderer/components/processes/process-explorer-view.tsx |
Passes the active detail key into the history hook so it can manage recency/retention correctly. |
README.md |
Adds a video link demonstrating the app. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
vladimir-ikryanov
approved these changes
Jun 18, 2026
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.
Previously, every opened process detail CPU/Memory history graph kept collecting history in the background. Opening many process detail pages could make the renderer use more and more memory over time. Now, MoStats keeps only a limited set of recently viewed process graphs alive. Recent graphs still feel responsive when revisited, but older unused graph history is automatically cleaned up.
Also, it adds video to
README.md.