perf: benchmark and optimize large-doc write and sync paths#113
perf: benchmark and optimize large-doc write and sync paths#113marcus-pousette wants to merge 23 commits into
Conversation
BenchmarksTriggered by
Status: ✅ <5% change | 🟡 5–10% | 🟠 10–30% | 🔴 >30% Artifacts:
|
|
/bench |
2e7e8e2 to
e9842be
Compare
5d14cae to
178c469
Compare
95df399 to
7d7c893
Compare
c983b86 to
f890a7a
Compare
This reverts commit 5c35bc2.
98ac82e to
2236e7f
Compare
|
Superseded by #203. The critical counter-cache upgrade fix is now isolated to 6 files (+221/-29), includes a rolling-upgrade-safe trigger/backfill migration, and is fully green in CI including live PostgreSQL 16 tests. This PR mixed that fix with 46 files of benchmark and optimization experiments (+4580/-856). Those experiments remain available in the |
This PR improves large-doc write and sync performance and adds benchmark coverage to measure those paths repeatably. The main runtime work is in the Postgres backend, with supporting benchmark instrumentation in the playground and benchmark runners.
Runtime changes
treecrdt_replica_metastores per-replica max countersBenchmark and test support
@treecrdt/postgres-napiruntime-only and move fixture helpers under@treecrdt/postgres-napi/testing--postgres-urlRepresentative results
eu.sync.emhub.net10kstructure-only:266ms10kpayload subtree:242ms100kpayload subtree:210msto227mseu.sync.emhub.net:189.9msus.sync.emhub.net:241.3mssync.emhub.net:254.8ms1mtrees1.8ms, insert sibling3.5ms, move leaf47.7ms0.82ms, insert sibling1.23ms, move leaf2.20ms0.13ms, insert sibling0.23ms, move leaf0.81msNot in scope here: public-host
1mseeding and remote re-sync results.