Skip to content

Startup freeze: renderer pinned at ~100% CPU with zero I/O (vault-operator alone) #84

Description

@VadimBrazevich

Environment

  • Vault Operator: 3.8.1 / Obsidian 1.13.7 / macOS (Apple Silicon) M1 Pro 16 gb
  • Vault: ~885 .md files, ~477 MB total
  • knowledge.db: ~93 MB, 4,905 vectors (all 4096-dim, embedding_model='unknown'), 210 edges, 812 note summaries, 0 implicit_edges
  • Embedding config: enableSemanticIndex: true, active model qwen/qwen3-embedding-8b (remote API), enableImplicitConnections: true, implicitThreshold: 0.7, enableReranking: true, enableGraphExpansion: true

Repro

  1. Disable all community plugins → Obsidian starts fast, CPU idle.
  2. Enable only vault-operator → Obsidian loads UI but freezes; renderer process at 99–100% CPU for 5+ min, no disk/network I/O (lsof shows no vault/DB traffic).
  3. Clearing inflight-tasks.json (4 abandoned executing-tools tasks), disabling autoTaskRouter, and then setting enableImplicitConnections: false in both data.json and settings.json did NOT fix it.

Suspected hot paths (from reading 3.8.1 main.js)

  • computeAll() (ImplicitConnections): O(n²) all-pairs 4096-dim cosine YG() over all note vectors, queued as boot job "implicit connections". 4,905 notes ≈ 12M pairs ≈ ~50B flops on the main thread.
  • proposeOrphanLinks(): per-orphan × all-notes YG() loop (called from vault-health orphan path); with ~2,800 orphans × 4,905 notes this is also O(n²)-scale.
  • checkInconsistentTags(): hc_tags self-join (t1.tag < t2.tag AND LOWER(t1.tag)=LOWER(t2.tag)), queued via boot job "vault health".
  • sample stacks show main thread 100% inside V8 JS (minified, no symbols) with idle WASM worker threads — consistent with a JS cosine-loop spin, not ONNX/reranker or network wait.

Expected

Heavy similarity jobs should not run synchronously on the main thread at startup, should be cancellable/skippable when implicit_edges is empty, and should yield (the setTimeout(0) yield exists in computeAll but apparently never lets the UI breathe at this scale).

Related

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions