Skip to content
Ownfold
Esc
navigateopen⌘Jpreview
On this page

Performance budgets

Enforced browser bundle, worker, recovery, record-operation, and clean-consumer budgets for the Ownfold public beta.

Ownfold treats performance regressions as release failures. The repository measures the production vault demo after minification, measures compressed transfer sizes, runs real cryptographic operations, and installs the packed SDK outside the workspace.

Browser download budgets

The worker-backed production demo currently produces the following reviewed assets:

Asset Current raw size Current gzip size Enforced maximum
Initial application JavaScript 293,704 bytes 85,987 bytes 350,000 raw / 105,000 gzip
Dedicated cryptographic worker 1,067,626 bytes 327,850 bytes 1,100,000 raw / 340,000 gzip
Application-owned demo CSS 2,066 bytes 834 bytes 10,000 raw / 3,000 gzip
Headless React package 4,758 bytes 1,399 bytes 6,000 raw / 2,000 gzip

The combined initial application, worker, and CSS budget is 450,000 gzip bytes. The current result is 414,671 gzip bytes. The HTML must not preload dynamic chunks or the worker.

The main-thread sodium engine is loaded dynamically. Applications that supply createWorkerCryptoEngine() therefore do not download a second sodium payload on the main thread. Applications using the zero-configuration main-thread engine download that chunk only when the first cryptographic operation starts.

libsodium-wrappers-sumo remains intentional. Ownfold Recovery Kits use Argon2id through crypto_pwhash, which is not included in the standard JavaScript wrapper. Replacing sumo requires a cryptographic-suite ADR, immutable compatibility fixtures, migration planning, and security review; bundle size alone cannot justify changing a password KDF.

Operation budgets

The real sodium engine must complete each of the following within five seconds on the release runner:

  • engine initialization and root-key generation;
  • Recovery Kit creation;
  • Recovery Kit opening; and
  • 128 sequential encrypt-and-decrypt record round trips.

These are regression limits, not claims about every user device. Before launch, run the Recovery Kit flow on representative lower-powered phones and laptops and record median and high-percentile timings. A slower device result can require parameter or UX work, but cryptographic parameters must never be weakened silently.

Consumer and lifecycle evidence

The release gate creates real tarballs for all 20 packages, replaces unpublished registry dependencies with their sibling tarballs, installs without workspace links or lifecycle scripts, type-checks every root and public subpath, and imports every runtime entry from Node.

The full-stack Playwright tracer additionally proves:

  • reload restores the persisted browser identity in a locked state;
  • device-key unlock decrypts server-stored ciphertext after reload;
  • unavailable IndexedDB produces a typed error the host can render actionably;
  • externally evicted browser storage returns to unavailable-on-device; and
  • the Recovery Kit restores and decrypts the original server record after eviction.

Real Safari private-browsing behavior, operating-system storage pressure, background tab suspension, and low-memory device behavior still require manual device-matrix evidence.

Last updated on August 4, 2026

Was this page helpful?