Skip to content

perf: preserve plugin compilation caching across reloads - #444

Merged
chhoumann merged 5 commits into
masterfrom
perf/startup-private-feeds
Oct 13, 2026
Merged

chhoumann merged 5 commits into
masterfrom
perf/startup-private-feeds

Conversation

@chhoumann

@chhoumann chhoumann commented Oct 13, 2026 •

Copy link
Copy Markdown
Owner

Summary

Restore PodNotes' compiled-code reuse when Obsidian reloads the renderer. A String.raw tagged template introduced by #428 disables V8's eval cache for the entire bundle. Replace it with an exactly equivalent ordinary string and cover four hostname normalization cases in the privacy tests.

On Linux with Obsidian 1.14.4, the startup-report entry after the isolated runner's setup/reload measured 13.10 ms before -> 3.95 ms after, across ten paired runs on the current base including #439. This is a repeated-load improvement. Fresh-process runs showed no demonstrated speedup, correcting the earlier cold-start interpretation.

Measurement report and load-time table | Raw reports, traces, scripts, and check logs

Verification

  • npm run lint, npm run format:check, npm run typecheck, npm run build: pass.
  • npm run test: 1,984 tests pass; Svelte checks have 0 errors and 0 warnings.
  • npm run test:tooling: 11 tests pass.
  • npm run docs:build: pass, including internal links and 112 legacy fragments.
  • npm run size: 292,929 raw bytes / 93,106 gzip bytes, within both budgets.
  • npm run test:e2e: all 89 tests pass on Obsidian 1.14.4 and again with PODNOTES_OBSIDIAN_APP=/opt/Obsidian/obsidian on 1.13.7, Linux. Both commands exit 0.

Both independent reviewers, GPT-6 Astra and Claude Fable, confirmed the mechanism and string equivalence. A mutation that removes the address fallback fails exactly the four new tests. Runtime coverage uses the isolated vault and synthetic feeds, including http://priv3.supercast.com:<port>/feeds/PRIV3_E2E_SENTINEL/feed.xml, and asserts privacy in data.json, cache keys, and note links.

Example startup report screenshot, from a separate final launch; not a benchmark sample.

Release impact

None. Privacy behavior, storage shape, save timing, public API, and URI handling are unchanged. Existing terminal-dot alias gap #441 and a bundle guard against tagged templates #443 are separate follow-ups.

Docs at release

None. No documented behavior changes.

Note

Replace tagged template in redactPrivateFeedAddresses regex to preserve plugin caching

  • Swaps the tagged raw template for the candidate-address regex fragment in privateFeedUrl.ts with an equivalent escaped string, so Obsidian can reuse the eval-compiled plugin across reloads.
  • Adds a comment in the source documenting the caching reason.
  • Expands the redactPrivateFeedAddresses test suite in privateFeedUrl.test.ts with cases for quoted aliases of percent-encoded, Unicode/punycode, decimal IPv4, and expanded IPv6 hostnames, verifying feed URLs are redacted while episode media URLs stay unchanged.
  • Behavioral Change: none — the address-matching pattern remains equivalent.

Macroscope summarized 1599607.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Deploying podnotes with  Cloudflare Pages  Cloudflare Pages

Latest commit: 1599607
Status: ✅  Deploy successful!
Preview URL: https://8506e39f.podnotes.pages.dev
Branch Preview URL: https://perf-startup-private-feeds.podnotes.pages.dev

View logs

@chhoumann
chhoumann merged commit 4cc2aeb into master Oct 13, 2026
14 checks passed
@chhoumann
chhoumann deleted the perf/startup-private-feeds branch October 13, 2026 06:24
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