-
Multi-Hoster-Upload v3.3.99 Stable
released this
2026-06-21 18:38:21 +02:00 | 10 commits to master since this releasev3.3.99 — The real fix: history split out of the hot config file (kills the 1-2s button lag)
The previous build's instrumentation finally named the true cause of the UI lag, and it was none of the read-path suspects.
electron-config.jsonhad grown to 38.5 MB and was being loaded / structuredCloned / JSON.stringified ~137 times in a 73-second window (140–592 ms each) on the main thread — roughly 47% main-thread occupancy. A button click landing while the thread is mid-clone of a 38.5 MB object is exactly the 1–2 s delay.The bulk was history, not the queue: every completed batch appended the full per-file result list (per-hoster URLs) into the config, and the default retention never prunes it, so it grew without bound.
Fix — history now lives in its own
electron-history.jsonand is never parsed, cloned or serialized during normal operation:- One-time, fail-safe migration at startup: the history file is written, fsync'd and verified before the config is ever allowed to drop its history, and a permanent
electron-config.json.pre-history-split.bakis kept. Your existing history is never the sole copy and is fully preserved. - After migration the config file shrinks from tens of MB to a few KB, so every config read/write becomes sub-millisecond. Validated against a real 185 MB / 30000-entry fixture: all entries preserved, load time 631 ms → 0.1 ms.
Comprehensive instrumentation (additive, set
MHU_PERF=0to disable): every IPC handler now logs its wall-time when slow (the button-press latency), a main-process long-task monitor logs any main-thread turn over 100 ms with context, and the config-store perf lines gained caller attribution. This makes any remaining stall name itself directly.405 tests pass (9 new migration tests). No upload behavior changed.
Downloads
- One-time, fail-safe migration at startup: the history file is written, fsync'd and verified before the config is ever allowed to drop its history, and a permanent