Skip to content

Development - #19

Merged
56steve merged 2 commits into
mainfrom
development
Sep 23, 2026
Merged

56steve merged 2 commits into
mainfrom
development

Conversation

@56steve

@56steve 56steve commented Sep 23, 2026

Copy link
Copy Markdown
Owner

No description provided.

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.
@56steve
56steve merged commit fb4fff5 into main Sep 23, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant