Closed
Labels
Milestone
Description
Problem
docs/BENCHMARKS.md shows query latency only at 1K and 10K facts:
| Benchmark | 1K facts | 10K facts |
|---|---|---|
point_attribute |
2.12 ms | 26.09 ms |
join_3pattern |
5.94 ms | 75.88 ms |
Both grow linearly. If that continues, a 1M-fact graph would take seconds per attribute scan or join. That is too slow for most high-stakes embedded use, and no published number shows what really happens. checkpoint takes 40 ms at 1M facts and grows with graph size (#315).
A user cannot tell whether their workload fits.
Ask
- Add query benchmarks at 100K, 1M and 10M facts: point entity, point attribute, 2- and 3-clause joins, recursive rules,
:as-of,:valid-at, and aggregation. Include a "hot entity with long history" case (perf: point query on a bound entity scans the entity's whole version history — O(retract/reassert count), not O(live facts) #323, perf: compute net-assert on v8 index keys before resolving facts (O(live) point queries) #379). - Record open time, checkpoint time and RSS at the same sizes.
- Publish a performance envelope in
docs/BENCHMARKS.mdand the README: the sizes and query shapes that are supported and tested, with p50/p99 latency. Also state the sizes that are not supported yet. - Profile the attribute scan and 3-clause join at 1M facts and file follow-up issues for the top costs.
- Re-run all the benchmarks and refresh the snapshot for each minor release.
Activity
adityamukho commentedon Oct 7, 2026
Carried over from #462 (closed): record the FFI round trip through the Python binding (minigraf-python
v3,db.query(...)withnext_batch(1000)), with wall time and RSS, in the performance envelope. Measured here, it is the baseline for today's cursor, which computes the whole answer when it opens. #473 (the streaming engine split off from #432) re-measures it as an acceptance test.Merge pull request #533 from project-minigraf/perf/394-envelope
adityamukho commentedon Oct 11, 2026
Done on
v3in #533 (42b88ba):examples/perf_envelope.rs, theenvelopeprofile, and the envelope indocs/BENCHMARKS.mdand the README at 100K/1M/10M facts. The Python FFI round trip is in minigraf-python#8. Follow-ups from profiling at 1M facts: #528 (bug, v3.0.0) and #529–#532 (perf, v3.1.0); join and binding costs are noted on #473.