Skip to content

perf(deps,memory): pin rune e5ec031ca (active cache trim #4022) and tune tab hibernation - #2576

Merged
Hona merged 2 commits into
devfrom
perf/pin-rune-and-tune-hibernate
Dec 6, 2026
Merged

Hona merged 2 commits into
devfrom
perf/pin-rune-and-tune-hibernate

Conversation

@Hona

@Hona Hona commented Dec 6, 2026

Copy link
Copy Markdown
Member

Bumps the anomalyco/rune workspace pin from 8a2083a05 to e5ec031ca (pulling in active cache and GPU layer pool trimming from anomalyco/rune#4022) and tunes idle tab hibernation in apps/desktop/src/shell/tab_hibernate.rs.

Changes

  • Rune pin (Cargo.toml, Cargo.lock): Updated all 21 anomalyco/rune dependency and [patch] entries from 8a2083a05b177897bef3935a90715001347b291a to e5ec031ca96ee5a0f1c061b25aa66e99fb8a7e47.
    • Pulls in anomalyco/rune#4022 (e64684e89: periodic soft cache and GPU pool trim during continuous drawing, TextSystem::trim_unused(), ImageAtlas::trim_unused(), spare GPU layer pool 32 -> 8 MiB, El::cache aging behind spinners).
    • Pulls in ebaba5063 (4 rune-kit thread-local state/cache bug fixes), 52e2770b9 (resvg 0.50 + SVG depth cap), f234a9ad4 (SVG DoS bounds), and 2bf132a94 (procwatch cpu_time).
    • Zero upstream API adaptations required.
  • Idle hibernation grace windows (apps/desktop/src/shell/tab_hibernate.rs):
    • Tightened TAB_IDLE_SECS from 180.0 s to 90.0 s.
    • Tightened SUBAGENT_IDLE_SECS from 60.0 s to 30.0 s.
    • Active tab, 2 MRU warm background tabs, running/queued/pending/compaction/unresolved-send/rewind/fork/shell/other-window tabs, and all in-app browser panes (workspace_panes.browser) remain live and untouched.
  • Hibernate sweep reliability fixes (apps/desktop/src/shell/tab_hibernate.rs):
    • Prevent overdue sweep starvation on active frames: Previously, any Fingerprint change (running_ver, inboxes_ver, parked_stamp, etc.) at or past an armed due deadline bypassed PhaseEvent::Tick and deferred active-server eviction by +CLICK_EVICT_DEFER_SECS (1.0 s) while re-arming past deadlines (<= now) for parked servers. Now poll() runs PhaseEvent::Tick -> RunSweep when tick_due && !route_or_tabs, keeping the 1 s deferral strictly for tab/route click frames.
    • Clamp past parked-server deadlines in scan_active_only: Avoids passing a past timestamp to tx.wake_at.
    • Track has_pool and sessions_len in Fingerprint: Ensures transcripts hydrated before s.pages.set(...) (when reloadable was false) or subagent transcripts arriving before their SessionInfo are re-evaluated as soon as the page pool or session metadata arrives.

Audit note: startup-loaded background tabs

  • step_warmth transitions never-visited resident background tabs directly from None to TabWarmth::Cooling { idle_since: now, kind: BackgroundTab } (no Active-first requirement).
  • Speculative startup prefetches (boot.rs:761, WARM = 6) stay inside s.pages.pool's private q.ready cache without entering s.transcripts (session/pages/mod.rs:686). Because tab_hibernate only iterates s.transcripts, those never-visited prefetched pages are out of scope here (session/ is owned by a separate Wave 2 track).

Verification

  • pwsh scripts/guardrails.ps1 — passed (12/12, 16.9 s).
  • cargo check -p opencode-desktop --no-default-features --features knobs — passed (0 warnings in touched files).
  • cargo check -p opencode-web --target wasm32-unknown-unknown — passed (0 warnings in touched files).
  • git diff --check — clean; tab_hibernate.rs is 499 lines (<= 800), no tests, no .cursor(...), no std::time::Instant/SystemTime.
  • Owned files only: Cargo.toml, Cargo.lock, apps/desktop/src/shell/tab_hibernate.rs.

@Hona
Hona merged commit e845a66 into dev Dec 6, 2026
5 of 8 checks passed
@Hona
Hona deleted the perf/pin-rune-and-tune-hibernate branch December 6, 2026 12:45
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