mirror of
https://github.com/sotashimozono/obsidian-remote-ssh.git
synced 2026-07-22 06:52:07 +00:00
Dogfooding beta.14 (RPC daemon finally up): a profile pointed at a large
remote vault (~/work with tens of thousands of files) froze Obsidian for tens
of seconds on connect and the File Explorer stayed empty. Root cause:
VaultModelBuilder.build materialised every walked entry and fired a
vault.trigger('create') for each in ONE synchronous JS tick — 30k+ inserts +
30k+ events block the main thread.
- VaultModelBuilder: extract the per-entry insert into `insertBuildEntry`
(shared by buildSync); add `buildChunked(entries, chunkSize=500)` that
processes the folders-first list in chunks and yields to the event loop
between them, so the tree fills in progressively and the window stays
responsive. Ordering is preserved (parents before children) and inserts are
idempotent, so a live fs.changed insert landing between chunks can't
double-add.
- populateVaultFromRemote uses buildChunked.
Structure-only caching (persist the walked tree to skip the cold re-walk on
reconnect) and lazy per-folder loading are follow-ups; this alone removes the
freeze. tsc/lint/vitest green (1196). Ships as beta.15.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
||
|---|---|---|
| .. | ||
| e2e | ||
| scripts | ||
| src | ||
| tests | ||
| esbuild.config.mjs | ||
| eslint.config.mjs | ||
| manifest.json | ||
| package-lock.json | ||
| package.json | ||
| styles.css | ||
| tsconfig.json | ||
| versions.json | ||
| vitest.config.ts | ||
| vitest.integration.config.ts | ||
| vitest.replay.config.ts | ||
| vitest.setup.ts | ||