Query benchmark: methodology & results

Every Wishmio storefront operation runs in under 100 database queries, and that cost is flat in list size — item #50 costs the same as item #1. This is a published spec enforced in CI, not a marketing average.

The curve

Queries per add as a wishlist grows from 0 to 50 items.

150q 75q 0 0 items 50 items Published budget: 100 queries — CI fails above this line Wishmio — flat, any list size
Measured 2026-07-10, clean Docker rig (WordPress + WooCommerce current, no object cache — worst case).

Method

Docker: WordPress (PHP 8.3, MariaDB 11), WooCommerce current, 60 seeded products, guest session, no object cache (worst case). A 19-line mu-plugin logs get_num_queries() per request on shutdown — measurement without instrumentation bias.

The harness adds 51 products via REST, then reads, counts, and removes; it asserts the budget and flatness (add #50 ≤ add #1 + 5 queries).

Results — 2026-07-10, v0.1.0, WP + Woo current

OperationQueries
Add item #166
Add item #5060 (flat — O(1))
Read full list @ 51 items56 (ETag'd; repeat visits 304)
Count @ 51 items47
Remove 1 item @ 5155

REST-baseline overhead (an empty WooCommerce REST request) accounts for most of this, so Wishmio's marginal cost is a small, flat handful of queries per operation regardless of list size. Caps, rate limiting, and share checks are all inside these numbers.

Reproduce it yourself

The budget is enforced in CI on every push — this isn't a one-time measurement. Run the same script locally:

scripts/dev-setup.sh
python3 scripts/bench.py

The script seeds 60 products, drives 51 real REST requests against a guest session, and exits non-zero if any operation exceeds budget or if adds aren't flat in list size.

House rules