Skip to content

perf(storage): skip unchanged OPFS namespace publication - #272

Merged
f0rr0 merged 1 commit into
f0rr0/patch-correctness-refreshfrom
f0rr0/opfs-skip-transient-namespace-publication
Oct 8, 2026
Merged

f0rr0 merged 1 commit into
f0rr0/patch-correctness-refreshfrom
f0rr0/opfs-skip-transient-namespace-publication

Conversation

@f0rr0

@f0rr0 f0rr0 commented Oct 8, 2026

Copy link
Copy Markdown
Owner

Summary

A PostgreSQL temporary-file create/delete cycle currently flushes unrelated dirty files and rewrites OPFS state.json even when its final mapping equals the published mapping. Cache the canonical last successfully published state and skip that redundant publication. Real namespace changes still flush WAL, ordinary files and pg_control before the atomic state write; the cache advances only after that write succeeds.

This preserves the direct-worker and portable-fallback format/ownership/lifecycle established in #142/#144/#153. Explicit guest file-sync requests, initialization, full and close barriers remain unchanged with fsync=on or off, as required by #268. Paths, backing identities and initialization phase all participate in equality. No new format, option or journal.

Release Intent

  • Package/API/runtime change: PR title uses perf:.
  • Docs/CI/repository-only change: no release intended.
  • Source/input/runtime asset change: source pins, generated metadata, and release metadata affectedness are current.

Verification

  • Moon affected checks and tests passed: oliphaunt-wasix-ts:format-check, lint, typecheck, test (369 tests, 4,388 assertions).
  • oliphaunt-wasix-ts:package passed.
  • Existing OPFS suite plus regressions for all boundaries with/without explicit file sync; failed WAL/relation/state publication and retry; open-unlinked descriptors; reserve exhaustion; rename/replacement backing identities; stale process files; reopen and portable handoff.
  • Separate fresh Chrome 155.0.8059.39 processes for base and candidate: three warmed spill queries publish state once each before, zero times after, with both fsync settings. Actual 48-table DDL/checkpoint still publishes. Commit/rollback and SQL-error recovery pass; abrupt Worker termination/reopen retains the committed row and all 48 tables; Window portable writes reopen correctly through direct Worker storage. Injected real flush/state-close failures retain the previous namespace/backing bytes after Worker termination.

Browser probes used newly compiled SDK JavaScript with matching retained producers: host input SHA 710978d2ac4e6ede8155c463d7a364c10ff1f9ecf2f03353a2a2cb51792f3ddb; PostgreSQL guest fingerprint 18.4:81a81ec695fb0c7901407defaa1d2f7973617154cf27ba74e3a7ab8e64436094:5e84414df70fd93bd816c17e1f71c26748baa631a4d025fa0fbe20b080ed6a32.

Worker termination establishes storage lifecycle recovery, not OS power-loss durability. Full integrated CI and Firefox/WebKit/Windows remain qualification gates. No general end-to-end speedup is claimed.

@vercel

vercel Bot commented Oct 8, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
oliphaunt-docs Skipped Skipped Oct 8, 2026 9:46am UTC

@f0rr0
f0rr0 marked this pull request as ready for review October 8, 2026 14:21
@f0rr0
f0rr0 merged commit 811f6ea into f0rr0/patch-correctness-refresh Oct 8, 2026
72 checks passed
@f0rr0
f0rr0 deleted the f0rr0/opfs-skip-transient-namespace-publication branch October 8, 2026 14:22

This branch was previously deployed

1 inactive deployment
Preview — 9fc96db4 Deployed Oct 8, 2026 by vercel[bot]
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