mirror of
https://github.com/fancive/obsidian-parallel-reader.git
synced 2026-07-22 06:53:43 +00:00
- anchor.ts: precompute line-offset index once; O(log n) binary-search offsetToLine replaces two O(n) newline-count loops. findLineForAnchor takes an optional lineOffsets param (backward compatible). - cards.ts / generation.ts: build the line-offset index once per document and thread it through all card anchor resolutions (was N cards x ~9 full-document O(n) passes -> 1 O(n) pass + N x O(log n)). - anchor.ts: ASCII-whitespace charCode fast path in normalizeWithMap, deferring to /\s/ only for non-ASCII (exact semantics preserved). - settings.ts: memoize generationFingerprint by settings object identity (WeakMap) — collapses SHA-1 + stableStringify done on every file-open. - view.ts: remove keydown listener in onClose (lifecycle leak fix). Verified: tsc, build, biome, all 28 tests, e2e smoke, branch coverage 100% (new anchor regression tests added). Deferred (higher risk / test-breaking): view full-render->surgical DOM, scroll rebind guard, cache scheduleSave timing — see notes/perf-report.md. Change-Id: I17eef347471bb8233d48164e4453d492f301eac2 |
||
|---|---|---|
| .. | ||
| anchor.ts | ||
| backend-test.ts | ||
| batch.ts | ||
| cache-manager.ts | ||
| cache.ts | ||
| cards.ts | ||
| cli.ts | ||
| error-ui.ts | ||
| generation-job-manager.ts | ||
| generation.ts | ||
| i18n-strings.ts | ||
| i18n.ts | ||
| markdown.ts | ||
| modal.ts | ||
| navigation.ts | ||
| prompt.ts | ||
| provider-bodies.ts | ||
| provider-parsers.ts | ||
| provider-presets.ts | ||
| provider-request.ts | ||
| providers.ts | ||
| schema.ts | ||
| scroll.ts | ||
| settings-tab.ts | ||
| settings.ts | ||
| streaming.ts | ||
| test-exports.ts | ||
| types.ts | ||
| ui-helpers.ts | ||
| vault.ts | ||
| view.ts | ||