Release v0.6.38: avoid unnecessary RichEdit and cancel hidden history previews

This commit is contained in:
2026-11-04 17:24:57 +02:00
parent 30e70192dc
commit fa2f6d2ce4
12 changed files with 62 additions and 30 deletions
+7 -7
View File
@@ -1,17 +1,17 @@
# Latest Windows release
## v0.6.37 — 2026-11-04
## v0.6.38 — 2026-11-04
## Changes
- Image clipboard history capture runs in KSwitcher.Screenshot.exe, so Windows clipboard image allocations are released when the helper exits. The configured size limit, privacy exclusions and original clipboard formats are preserved.
- Automatic and uncached manual history OCR run in the same helper executable, in a separate short-lived process. Only encrypted requests and recognized text cross the process boundary. Windows OCR and optional Tesseract remain supported; profile changes and shutdown cancel background work, and deleted entries are not recreated by late results.
- Consecutive duplicate detection uses SHA-256 fingerprints stored inside the encrypted index. Exact payloads, image representations and decoded pixels can be compared without loading the previous record. Old entries acquire fingerprints on first comparison; pins and cached OCR are preserved. This does not introduce global deduplication.
- Copying text after an image no longer loads the previous image just to rule out a duplicate. Settings, shortcuts and defaults are unchanged. Keep all three executables together.
- Clipboard history loads RichEdit only when an HTML/RTF preview actually needs it. Empty history, plain text and image-only previews no longer initialize it unnecessarily.
- Plain text previews retain Unicode and line breaks without converting the text to RTF. Plain and formatted preview payloads share the existing bounded text-preview cache.
- Esc still clears hidden history rows and preview caches while preserving the remembered selection/top item. Closing or replacing a search now cancels obsolete preview work before loading/decoding where possible, and discards completed stale results.
- A RichEdit control that was needed for formatted text is cleared and reused, not repeatedly destroyed/recreated. This avoids additional initialization on reopening. Settings, shortcuts, stored clipboard contents, formatting on paste and OCR behavior are unchanged.
## Validation
Staged build: dictionary equivalence for 140,939 words, 105 sync checks, wheel batching, 313 native checks, 559 input checks, screenshot UI/PNG/notification registration, 48 updater checks and updater progress UI. Windows OCR tests cover helper equivalence, cancellation, failure, encrypted temporary-file cleanup, persisted background search and unchanged clipboard. Optional Tesseract and clipboard-capture integration are also verified.
Staged build and tests cover dictionary equivalence for 140,939 words, 105 sync checks, wheel batching, 315 native checks, 561 input checks, screenshot UI/PNG/notification registration, 48 updater checks and updater progress UI. Added checks for plain previews without RichEdit, retained HTML rendering, lazy control creation and cleanup through Esc. Isolated real-window tests also verified formatted previews after reopening.
Three controlled OCR comparisons used the same image and settings: retained private working set in the isolated test process fell by about 0.8 MiB. Combined parent/helper peak RAM did not fall (about 55.6 versus 56.6 MiB); the large peak is now outside the resident process and disappears when the helper exits. A separate live screenshot test finished at 4.41 MiB private working set in the main application. These observations are not fixed memory limits or guarantees for another machine/workload.
A controlled local comparison measured 0.72 MiB less private working set after Esc for empty history, 0.66 MiB for plain text, 0.48 MiB for formatted text and 0.53 MiB for images. These are isolated test-process comparisons, not the application's total RAM or a guaranteed reduction on another computer. The reported 7 MiB plateau on a different laptop was not reproduced. No working-set trimming was used; closing the history window does not promise an exact return to startup memory.
## Upgrade
Choose **Update** in the tray menu. Legacy v0.3.0–v0.4.1 clients first receive the v0.4.2 compatibility bridge, then the current full release. v0.2.3 and earlier require manual installation.