Skip to content

Update sqlite3_web package#144

Merged
simolus3 merged 4 commits into
mainfrom
sqlite3-web-update
May 27, 2026
Merged

Update sqlite3_web package#144
simolus3 merged 4 commits into
mainfrom
sqlite3-web-update

Conversation

@simolus3
Copy link
Copy Markdown
Contributor

@simolus3 simolus3 commented May 27, 2026

This updates sqlite3_web to the latest version, 0.8.0. That version avoids representing URLs as Dart Uri to reduce the size of database workers (using Uri.parse pulls in a lot of code). Additionally, it allows using a compile-time option to disable support for Dart BigInts (which don't use JS BigInts internally, and also pull a bit of code). For the worker, we can just rely on JS BigInts since that's how clients encode those values in postMessage calls. I've added a test using bigints to verify these claims.

This update reduces the default worker size from 267,753 bytes to 213,648, a nice 20% reduction. Unfortunately I doubt we'll see much of an impact on the PowerSync SDK because the sync half of the worker still uses Uris.

Further, version 0.8.0 replaces the OPFS file system based on atomics and shared array buffer with a new implementation not requiring those (by lazily opening files when a database lock is acquired). This only affects Safari because we can use OPFS in shared workers on Firefox and readwrite-unsafe on Chrome, but this finally means OPFS is available in all major browsers without additional setup.

I've disabled the build_runner test step due to a bug in recent build_runner versions (linked from a comment).

Comment thread .github/workflows/release.yml
@simolus3 simolus3 requested a review from stevensJourney May 27, 2026 07:41
Copy link
Copy Markdown
Contributor

@stevensJourney stevensJourney left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are very nice improvements

@simolus3 simolus3 merged commit 63dc05e into main May 27, 2026
6 checks passed
@simolus3 simolus3 deleted the sqlite3-web-update branch May 27, 2026 12:27
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.

2 participants