Melon-dbMelon-db
Performance comparison

Latest results

Most recent Melon-db vs WatermelonDB benchmark parity table from the committed harness artifact.

Last updated via bench:compare:docs. Ratio is melon-node ÷ watermelon (< 1 means Melon-db faster).

10,000 rows

Scenariomelon-nodewatermelonRatioWinner
Row insert97.42 ms2460.70 ms0.0396melon
Batch insert36.08 ms46.58 ms0.7746melon
Filtered query0.70 ms1.40 ms0.4987melon
Count query0.38 ms0.41 ms0.9425melon
Find by id0.04 ms0.04 ms0.8726tie

melon-bun (reference)

Same scenarios on bun:sqlite — not compared to WatermelonDB.

ScenarioDuration
Row insert47.95 ms
Filtered query0.90 ms
Count query0.26 ms
Find by id0.03 ms
Batch insert18.35 ms

The table above is generated from apps/docs/src/data/bench-compare-latest.json. Refresh it after benchmark changes:

COMPARE_RUNNER_BIN=node bun run bench:compare:docs

Commit the updated JSON with your PR when timings should be reflected on the docs site.

React Native sample

On-device benchmarks from playground-rn-dev (development build with @melon-db/db-sqlite-native and WatermelonDB via @morrowdigital/watermelondb-expo-plugin).

Melon-db (jsi-sync) vs WatermelonDB

Captured · Device: iOS (playground-rn-dev dev client) (ios). Ratio is melon-jsi-sync ÷ watermelon (< 1 means Melon-db faster).

10,000 rows · melon-jsi-sync vs watermelon

Scenariomelon-jsi-syncwatermelonRatioWinner
Row insert959.88 ms744.80 ms1.2888watermelon
Batch insert494.39 ms93.08 ms5.3117watermelon
Filtered query0.87 ms2.60 ms0.3339melon
Count query0.20 ms0.60 ms0.3243melon
Find by id0.10 ms0.15 ms0.6705melon

jsi-sync vs turbo

Captured via playground-rn-dev manual run. Device: iOS (playground-rn-dev dev client) (ios). Ratio is jsi-sync ÷ turbo (< 1 means jsi-sync faster).

iOS dev client: jsi-sync + Watermelon @ 10k (melonVsWdb) and jsi-sync + turbo @ 10k (report).

10,000 rows · jsi-sync vs turbo

Scenariojsi-syncturboRatioWinner
Row insert905.34 ms2259.54 ms0.4007jsi-sync
Batch insert449.82 ms1680.55 ms0.2677jsi-sync
Filtered query0.72 ms0.71 ms1.0164turbo
Count query0.13 ms0.14 ms0.9322tie
Find by id0.04 ms0.07 ms0.5264jsi-sync

The table is generated from apps/docs/src/data/bench-rn-latest.json. To refresh after a new device run:

  1. In apps/playground-rn-dev, open Benchmarks and run jsi-sync + Watermelon at 10k (or 1k for smoke).
  2. Tap Share JSON report and merge melonVsWdb (and optionally report for jsi vs turbo) plus generatedAt / device into bench-rn-latest.json.
  3. Commit the updated JSON with your PR so the docs site picks up the new timings.

Same scenarios as the Node harness: row insert, batch insert, filtered query, count, and find-by-id. Ratio for Melon-db vs WDB is melonMs / watermelonMs (< 1 means Melon-db faster).