Repository navigation
Development - #19
Merged
Merged
Development#19
Conversation
Clipz froze for tens of seconds on launch, on both platforms, and showed as "not responding" before the window appeared. Four things caused it, and all of them get worse the longer someone uses the app: - Image clips are base64 in `content`, averaging 2.8 MB each. The fifty clips loaded at startup came to 63 MB, serialised through IPC and decoded into full-resolution images to draw 40px previews. Image clips now carry a ~6 KB thumbnail and the payload is 0.2 MB; the original is fetched only to open or copy it. Existing clips are backfilled in the background. - The list query selected `content` for every row, so SQLite read those megabytes even though images discarded them. It is now skipped in SQL, and long text travels as a prefix with the rest fetched on demand, which bounds the payload whatever someone happens to copy. - Ordering by pin and recency had no index: a full table scan plus a temp sort across a 539 MB table, 2.04s for fifty rows. With the index, 14ms. - Rendering a card started text recognition for every image lacking it, twenty at once on launch, each decoding megabytes before the recogniser ran. Recognition is now one at a time and waits until the drawer is opened, so a Clipz that starts with the machine costs nothing until it is used. Startup on a 539 MB history went from never settling within 30s to idle in about 2.5s, which matches an empty profile. Also fixes a drawer that closed itself immediately after opening. Expanding resizes the window, so the pointer that was over the pill ends up outside the new bounds; the watcher read that as the mouse leaving. Opening by keyboard had the same problem, where the pointer was never there at all. The mouse can now only leave somewhere it has been.
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.
No description provided.