Optimize large history browsing and preview memory usage#1391
Open
cayank wants to merge 8 commits into
Open
Conversation
Author
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
This is my first PR to this project, so I'd appreciate any feedback or suggestions.
This change raises the storage limit from 999 to 3000 items and improves memory behavior for large clipboard histories. Normal popup browsing no longer hydrates the full history into memory, avoiding excessive memory usage. It also bounds expensive preview/list rendering work and fixes status-bar popup edge cases on multi-display setups.
Impact
Priority Changes
1. Large History And Memory
2. Preview And Row Rendering
displayTitle, a capped title/excerpt, and search highlighting runs inside that displayed excerpt.3. Search
4. Status Bar And Popup Positioning
Popup.open/Popup.close, added click debounce, and guarded opening with anisOpeningflag.5. Storage And Clipboard
Before Testing
This branch adds optional SwiftData fields for fingerprints and thumbnails. Existing stores should be eligible for lightweight migration.
The local
MaccyPatched.apptest build still uses Maccy's existing storage path because storage is hardcoded to~/Library/Application Support/Maccy/Storage.sqlite, so back up the local store before testing with important clipboard history.Testing
Maccy.app, installs it locally asMaccyPatched.app, patches the local test bundle metadata, signs it ad hoc, clears quarantine attributes, verifies the signature, and opens it.MaccyorMaccyPatchedprocess first because the local side-by-side build still uses Maccy's shared storage path.Screenshots
1. Initial idle after launch: around 47.9 MB
2. Temporary memory peak during activity/scroll: around 150.4 MB
3. Warm idle after normal use: around 101.7 MB
4. Final warm idle after idle cleanup: around 93.3 MB
Notes