Skip to content

Commit 05d42e5

Browse files
committed
perf: optimize WASIX PGlite runtime benchmarks
Align the WASIX asset build with the audited PGlite source path and make the release asset profile performance-oriented by default. Add native Postgres and exact PGlite benchmark diagnostics, remove the spinlock-disabling build flag, refresh generated assets/AOT artifacts, and document the current performance findings and remaining optimization work.
1 parent d5bfc33 commit 05d42e5

71 files changed

Lines changed: 75651 additions & 27366 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitmodules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
[submodule "assets/checkouts/postgres-pglite"]
66
path = assets/checkouts/postgres-pglite
77
url = https://github.com/electric-sql/postgres-pglite
8-
branch = REL_17_5_WASM-pglite-builder
8+
branch = REL_17_5-pglite
99
[submodule "assets/checkouts/pglite"]
1010
path = assets/checkouts/pglite
1111
url = https://github.com/electric-sql/pglite.git

Cargo.lock

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,15 @@ extensions = [
5252

5353
[package.metadata.pglite-oxide.assets]
5454
postgres-version = "17.5"
55-
postgres-pglite-branch = "REL_17_5_WASM-pglite-builder"
55+
postgres-pglite-branch = "REL_17_5-pglite"
5656
pglite-build-repo = "electric-sql/pglite-build"
5757
pglite-build-branch = "portable"
5858
pglite-build-commit = "c195113dbaf09488f8d5eeb2db91dacd123b74d0"
59-
pglite-npm-version-checked = "0.4.4"
60-
runtime-archive-sha256 = "acb15508381101bcb5a25ef58d7150b2aa4fc6c4f79da2329e6876a7f1db2265"
61-
pglite-wasix-sha256 = "8043b5b330722c02ef4f36b491cceec8d12e524b800f291594f44cc9e27e264e"
59+
pglite-npm-version-checked = "0.4.5"
60+
runtime-archive-sha256 = "bbfd28372315c3e39e990513ae36bae56cc20a02b23dd4853542ec1c87ab8db0"
61+
pglite-wasix-sha256 = "70e81997f3425efcf32b4053a0dff70295c100b0ba7f3887288a267b4488daa9"
6262
pgdata-template-archive-sha256 = "a0a91f4fbd0428787ce78b351ee84f0c33f9ce8578448701b0f6080f7d8b052e"
63-
pg-dump-wasix-sha256 = "30ff71f1dd82b164ce2a4f595018217f3de7f946c297f0deba0f66f51127193e"
63+
pg-dump-wasix-sha256 = "879ef78363f4913fbc35ddc7d9de91812fd21e54bdd450cb527b4ba1746cd04f"
6464

6565
[dependencies]
6666
anyhow = "1"
@@ -75,6 +75,8 @@ regex = "1"
7575
tempfile = "3"
7676
hex = "0.4"
7777
sha2 = "0.10"
78+
dunce = "1"
79+
filetime = "0.2"
7880
pglite-oxide-assets = { version = "=0.3.0", path = "crates/assets", optional = true }
7981
tokio = { version = "1", features = ["rt-multi-thread"] }
8082
wasmer = { version = "7.2.0-alpha.2", default-features = false, features = [

README.md

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ The crate targets PostgreSQL 17.x PGlite builds and Rust 1.92+.
2323
cargo add pglite-oxide serde_json
2424
```
2525

26-
Default features include bundled runtime assets and cache warming hooks.
27-
Size-sensitive builds can opt out with `default-features = false` and provide
28-
runtime assets explicitly.
26+
Default features include bundled runtime assets, extension support, and cache
27+
warming hooks. Size-sensitive builds can opt out with `default-features = false`
28+
and provide runtime assets explicitly.
2929

3030
## Direct Embedded API
3131

@@ -97,24 +97,25 @@ Use the printed URL with your normal Postgres client library.
9797

9898
## How It Works
9999

100-
`pglite-oxide` is moving to a WASIX dynamic-linking asset pipeline. CI owns the
101-
expensive work: building PGlite, extension side modules, `pg_dump`, and
102-
target-specific Wasmer LLVM AOT artifacts. Application code gets a small API,
103-
preload hooks, and package-managed assets.
100+
`pglite-oxide` runs PGlite/Postgres from packaged WASIX runtime assets and loads
101+
precompiled Wasmer artifacts for the host target. Application code gets a small
102+
Rust API, optional preload hooks, and a local Postgres server mode for existing
103+
client libraries.
104104

105-
The pgvector path is staged in that pipeline and will become public only after
106-
the Rust runtime passes `CREATE EXTENSION vector`, vector insert, and distance
107-
query smoke tests.
105+
Bundled SQL extensions are installed on demand. `pgvector` and `pg_trgm` are
106+
available through the `extensions` API.
108107

109108
## Docs
110109

111110
- [Usage guide](https://github.com/f0rr0/pglite-oxide/blob/main/docs/USAGE.md)
112111
- [Extensions](https://github.com/f0rr0/pglite-oxide/blob/main/docs/EXTENSIONS.md)
113-
- [Runtime and performance notes](https://github.com/f0rr0/pglite-oxide/blob/main/docs/RUNTIME.md)
114-
- [Performance plan](https://github.com/f0rr0/pglite-oxide/blob/main/docs/PERFORMANCE.md)
115-
- [pg_dump status](https://github.com/f0rr0/pglite-oxide/blob/main/docs/PG_DUMP.md)
112+
- [Runtime](https://github.com/f0rr0/pglite-oxide/blob/main/docs/RUNTIME.md)
113+
- [Performance](https://github.com/f0rr0/pglite-oxide/blob/main/docs/PERFORMANCE.md)
114+
- [pg_dump](https://github.com/f0rr0/pglite-oxide/blob/main/docs/PG_DUMP.md)
116115
- [Tauri usage](https://github.com/f0rr0/pglite-oxide/blob/main/docs/TAURI.md)
117116
- [Tauri SQLx profiler example](https://github.com/f0rr0/pglite-oxide/blob/main/examples/tauri-sqlx-vanilla)
118117
- [Development guide](https://github.com/f0rr0/pglite-oxide/blob/main/docs/DEVELOPMENT.md)
119118
- [Runtime asset provenance](https://github.com/f0rr0/pglite-oxide/blob/main/docs/ASSETS.md)
120119
- [Release process](https://github.com/f0rr0/pglite-oxide/blob/main/docs/RELEASE.md)
120+
- [Completed implementation work](https://github.com/f0rr0/pglite-oxide/blob/main/docs/DONE.md)
121+
- [Implementation backlog](https://github.com/f0rr0/pglite-oxide/blob/main/docs/TODO.md)

0 commit comments

Comments
 (0)