Skip to content

v0.3.1 — cold-card stutter fix

Choose a tag to compare

@UnknowCao UnknowCao released this 04 Sep 02:55
· 17 commits to main since this release

Fixes: cold-start card stutter on every machine, high-end hardware included.

Why it stuttered

The breathing whale card is painted by the UI message pump — but the polling ran ON that same thread, synchronously:

  • The TCP port probe blocks up to 700 ms on a dead port. That is a kernel connect timeout, not CPU work, which is exactly why faster machines stuttered too.
  • The health-gate HTTP call (up to 1.5 s) and the log scrape also ran on UI-timer ticks.

With the probe throttled to every 400 ms and the port dead for the whole 10–13 s boot, the card spent more than half of the cold start frozen: breathe 0.4 s → freeze 0.7 s → repeat.

The fix

The whole poll state machine (probe → spawn → health gate → open) now runs on a background thread started when the card appears; control updates (status text, window open, failure panel) marshal back via BeginInvoke. Timeouts, throttles, and race protections are unchanged — only the thread moved. The UI thread now does nothing but paint.

Verified: health-gate regression still PASS (a stale 401 token never opens a window), and a burst re-capture of the card shows the breathing brightness modulating normally across frames.

Upgrade

dsh plugin --profile web add github:UnknowCao/dsh-dock#v0.3.1

Then restart dsh web — the desktop whale exe refreshes automatically on plugin activation. Sessions persist as always.

Full changelog: compare v0.3.0...v0.3.1.