Collection benchmarks¶
These reports are built by benched.sphinx from the recorded runs in benchmarks/results.
Each run retains its revision, dirty-worktree flag, parameters, Python version, and machine metadata.
The initial records are local development measurements, not release performance guarantees.
Browser collections¶
The browser-only suite measures eager mount and collection reconciliation at 1k, 10k, and 100k records. Reset delivery reconciles the complete collection; delta delivery applies granular changes. Parameters distinguish append, front insert, update, reorder, and ten-update burst workloads.
Python-to-browser collections¶
The wire suite sends real Python Store snapshots and patches over a loopback WebSocket to the
transports JavaScript client, connectStore, and Each. It covers JSON, MessagePack, and CBOR;
positional and application-keyed diff policies; and streamed or batched updates. Every round checks
final values, retained element identity, unsaved input, focus, and selection. Keyed cases require
the optional Store.host(list_keys=...) API and skip on older transports builds. The browser client
remains the version installed from Spaday’s lockfile.
Measurement boundaries¶
The keyed wire cases enforce operation-count budgets: one operation for insert, removal, update, move, or reorder; two for a moved-and-edited record; ten for a ten-update burst. Non-reorder payloads are bounded to 512 bytes per operation for these fixtures. These are structural regression checks, not universal limits on application data.
Virtual collections and server windows¶
test_virtual_collection measures fixed-height mount and scroll at 1k, 10k, and 100k records.
Its viewport realizes 18 rows at each size. test_server_window_round_trip serves the Python
example over HTTP and checks that a 100k-record source returns at most 20 records per window.
Virtualization bounds the DOM while retaining the full source array. Server windows bound both the response and mirrored data. Rows leaving the viewport are disposed, except a focused row that still exists in the available data. Neither mode preserves arbitrary offscreen element-local state.
Timing and instrumentation¶
The charts show pytest-benchmark timing distributions. For wire cases, that timing includes the
browser call and its correctness checks, but excludes initial snapshot delivery and eager mount.
The run records also retain each round’s diagnostics in extra_info:
roundtrip_render_ms: update request through two animation frames, excluding final checks.bridge_ms,diff_ms,encode_ms: server model conversion, Store mutation/diff, and wire encoding.client_receive_apply_ms: combined decoding, client reduction, and synchronous Store propagation. Deferred item-scope rendering is included inroundtrip_render_ms.snapshot_bytes,patch_bytes,operations,frames: encoded message bodies and update counts; WebSocket/TCP framing is excluded and compression is disabled.scope_writes,dom_mutations: label-property writes and observed child-list/character-data mutations. Attribute mutations are not counted by the text-update probes.long_tasks,long_task_ms,max_frame_gap_ms,estimated_missed_frames: browser responsiveness diagnostics. Missed frames are estimated from the median idle animation-frame interval, not GPU dropped-frame counters.heap_used_bytes: Chromium’s JavaScript heap estimate, not total browser memory.
Benched’s process peak-memory metric is distinct from the browser heap measurement. Timing and memory depend on hardware, browser version, scheduling, and whether data is already cached. Partial runs contain only the selected cases; missing cases are not zero-cost results. Structural budgets are enforced above; latency thresholds require calibration on representative hardware. This single-connection harness does not measure Hub fan-out, reconnect, or slow consumers.
MutationObserver and PerformanceObserver instrumentation runs inside the measured interval. These timings include its overhead and are not directly comparable with older uninstrumented measurements.
See How to benchmark collection updates for commands and local transports-build selection.