You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* TS leak fix
- src/views/tree.ts, src/views/matrix.ts: onOpen now await unmount(old) before
mounting new component.
- src/views/page.ts: track mounts in WeakMap<MarkdownView, ...>, unmount prior mount
per leaf each redraw_page_views, plus cleanup_page_views(plugin) export.
- src/main.ts: call cleanup_page_views(this) in onunload.
WASM soft-skip (rebuilt via bun run wasm:dev)
- wasm/src/data/edge_struct.rs: new is_current_revision() helper.
- wasm/src/data/traversal.rs rendering_obj_at_index: returns JsValue::UNDEFINED for
stale edges instead of throwing. NestedEdgeList's {#if render_data} already swallows
undefined → no row, no console error.
- wasm/src/edge_sorting.rs sort_traversal_data / sort_flat_traversal_data: skip sort
if any edge stale.
* fix(686): settings tab freeze on Windows — eager init reactive_settings
The reactive_settings.current getter assigned to its own $state variable
when read before init, which Svelte 5 detected as a derivation
self-mutating its own dependency and looped to effect_update_depth_exceeded.
Initialise _settings eagerly with DEFAULT_SETTINGS so the getter is a
pure read; init() simply swaps in the real settings.
release: 4.9.3-beta.2
* chore(diagnostics): perf marks + reactive-loop counters around settings tab
Add src/utils/perf.ts with perf_start/perf_end/perf_sync helpers and an
effect_counter that warns once when an effect re-runs >50x in <250ms.
All gated by debug.level <= DEBUG, so default INFO users see nothing.
Wrap SettingsTab.display, SettingsTab._build, each mount() call, and each
_add_settings_* section with perf_sync. Wrap reactive_settings.init with
perf_start/perf_end to confirm init timing.
Drop effect_counter ticks into the $effect bodies most likely to storm:
- TrailView writeback
- Matrix writeback
- TreeView writeback
- TransitiveImpliedRelations opens_sync
- NestedEdgeList opens_sync
Goal: diagnose remaining few-second freeze + effect_update_depth_exceeded
on Windows in 4.9.3-beta.2.
release: 4.9.3-beta.3
* chore(diagnostics): cover settings sub-components with effect counters
Beta.3 showed SettingsTab.display completes in 27ms cleanly, yet the
effect_update_depth_exceeded fires on the next microtask. The loop must
live in an $effect inside a sub-component that beta.3 did not instrument.
Add effect_counter ticks to:
- MatrixFieldOrderSettingItem
- FieldGroupLabelsSettingItem
- ShowAttributesSettingItem
- EdgeSortIdSettingItem
- ShowAttributesSelectorMenu (strip-excluded $effect.pre)
These are all mounted from _add_settings_matrix / _add_settings_tree_view /
_add_settings_list_index / _add_settings_freeze_implied_edges with
$bindable + select_cb pattern that writes back into plugin.settings — a
plausible cycle if Svelte 5 deep proxy notifies the prop subscriber.
release: 4.9.3-beta.4
* chore(diagnostics): cumulative effect counter + cover remaining effects
Beta.4 used a 250ms sliding window: an effect had to fire 50 times within
that window to trip. The reported 38-second hang on Windows fires
~2 iterations/second (each iteration awaits saveData disk I/O), so the
window never accumulated 50 runs and no counter logged.
Rework effect_counter to track cumulative runs and log at thresholds
1, 10, 50, 200, 1000. First-tick logs at DEBUG; subsequent thresholds
log at ERROR as effect-storm.
Also instrument:
- TrailView.log
- TrailView.depth
- TreeView.depth
- TreeView.root_open
- LockViewButton (writes lock_path bound to side-view settings)
- RenderMarkdown
release: 4.9.3-beta.5
* fix(686): break ShowAttributes/EdgeSortId/FieldGroupLabels reactive loop
ShowAttributesSettingItem, EdgeSortIdSettingItem, FieldGroupLabelsSettingItem
each ran a $effect that read a $bindable prop and called select_cb(value)
on every change. select_cb writes plugin.settings.X = value. Svelte 5
deep proxies notify subscribers on every property assignment — even with
the identical reference — so the prop reads back, the $effect re-fires,
calls select_cb again, ad infinitum. Each iteration awaits async
saveData, so the loop ran ~2/sec for ~38s on Windows before hitting
effect_update_depth_exceeded.
Cache previously-emitted value, skip select_cb when current === prev.
First mount still fires the cb (prev starts undefined), genuine user
changes still fire it (different reference), but the self-triggered
re-notification stops at the equality check.
release: 4.9.3-beta.6
* release: 4.9.3
Fix Windows Settings tab freeze (#686 follow-up). Two stacked bugs from
4.9.2:
1. reactive_settings.current getter mutated its own $state variable when
read before init — Svelte 5 raised effect_update_depth_exceeded as
a derivation self-mutating its own dependency. Initialise eagerly
with DEFAULT_SETTINGS so the getter is a pure read.
2. ShowAttributesSettingItem, EdgeSortIdSettingItem, and
FieldGroupLabelsSettingItem each had a $effect that watched a
$bindable prop and called select_cb(value) on every read. The
callback writes plugin.settings.X = value; Svelte 5 deep proxies
notify subscribers on every property assignment (even with the
same reference), the prop re-notifies, the effect re-fires.
Each iteration awaited saveData, so the loop ran ~2/sec for ~38s
before hitting the update-depth limit. Cache previously-emitted
value to skip self-triggered re-notifications.
Also ships the gated perf-mark + effect-counter instrumentation used
to diagnose this; active only at debug.level = DEBUG.
* Fix Settings tab freezing Obsidian on Windows in 4.9.2 — the freeze had two stacked causes. (1) `reactive_settings.current` assigned to its own `$state` variable when read before init, which Svelte 5 detected as a derivation self-mutating its own dependency. (2) Three settings sub-components (`ShowAttributesSettingItem`, `EdgeSortIdSettingItem`, `FieldGroupLabelsSettingItem`) had a `$effect` that watched a `$bindable` prop and called `select_cb(value)` on every read; the callback writes back into `plugin.settings.X`, which re-notifies the same `$bindable` (Svelte 5 deep proxies fire on any property assignment, even with an identical reference), re-runs the effect, and so on until `effect_update_depth_exceeded` triggered after ~38s of awaited `saveData` calls. The store now initialises eagerly with `DEFAULT_SETTINGS` and the three sub-components cache the previously-emitted value to skip self-triggered re-notifications.
12
+
* Add gated perf marks (`debug.level` set to `DEBUG`) around `SettingsTab.display`, each section mount, and reactive-loop counters around the suspect `$effect` bodies. Active only at `DEBUG` log level so default users see nothing.
* Fix the Windows Settings-tab freeze (`effect_update_depth_exceeded` + ~38s click hang). Three settings sub-components — `ShowAttributesSettingItem`, `EdgeSortIdSettingItem`, `FieldGroupLabelsSettingItem` — had a `$effect` that watched a `$bindable` prop and invoked `select_cb(value)` on every read. The callback writes back into `plugin.settings.X`, which re-notifies the same `$bindable` prop (Svelte 5 deep proxies fire on any property assignment, even with an identical reference), re-runs the effect, and so on until Svelte's update-depth limit triggers. Each iteration awaits an async `saveData` disk write, which is why the hang stretched to ~38s. Each effect now caches the previously-emitted value and skips the callback when the prop reads back as the same reference, breaking the cycle.
* Rework `effect_counter` to track cumulative runs (no 250ms reset window) and log at thresholds 1/10/50/200/1000. Beta.4's window-based counter missed slow loops — the 38-second hang on Windows ran ~2 iterations/second, never hitting 50 in any 250ms window. Also extend coverage to remaining $effects in `TrailView.log`, `TrailView.depth`, `TreeView.depth`, `TreeView.root_open`, `LockViewButton`, `RenderMarkdown`.
* Extend reactive-loop counters to the four settings sub-components most likely to fire on tab open (`MatrixFieldOrderSettingItem`, `FieldGroupLabelsSettingItem`, `ShowAttributesSettingItem`, `EdgeSortIdSettingItem`) plus `ShowAttributesSelectorMenu.strip`. Beta.3 timings showed `SettingsTab.display` completed in 27ms but the `effect_update_depth_exceeded` error still fired on the next microtask, so the looping `$effect` lives in a sub-component that beta.3 did not instrument.
* Add gated perf marks and reactive-loop counters around the Settings tab (per-section timings, mount durations, `effect-storm` warnings on TrailView/Matrix/TreeView/TransitiveImpliedRelations/NestedEdgeList) to diagnose the remaining few-second Settings-open freeze on Windows. Active only when `debug.level` is set to `DEBUG`; no effect at default log level.
* Fix settings tab freezing Obsidian on Windows in 4.9.2 — the `reactive_settings.current` getter assigned to its own `$state` variable when read before init, which Svelte 5 detected as a derivation self-mutating its own dependency and looped to `effect_update_depth_exceeded`. The store now initialises `_settings` eagerly with `DEFAULT_SETTINGS` so the getter is a pure read and `init()` simply swaps in the real settings.
0 commit comments