Performance overview¶
This page records what was measured, what was changed, and the current numbers.
What was measured¶
Measurements were taken on 2026-11-04 with a synthetic Xcelium log from
tools/bench/gen_xcelium_log.py (200k messages, 24 MB).
Step |
Before |
|---|---|
Plugin parse alone |
0.7 s |
TUI load until table drawn |
9.4 s |
Filter logic excluding table rebuild |
0.14 s |
Clear filter / sort / severity toggle |
6 to 9 s |
First scroll after rebuild |
5 s |
RSS after parse / after table drawn |
219 MB / 404 MB |
Diagnosis¶
About 90% of load and 95% of each interactive action was Textual
DataTable.add_rowplus its deferred_update_dimensionscell measurement.DataTablevirtualises rendering, not population.Parse was bound by Python object creation (about 40%: per-match dict,
Message,FileRef, metadata dict). Regex was under 20%, I/O about 6%.Memory per
Messagewas about 820 B:metadata dict: 184 B
raw_text: 167 Bslots object: 104 B
content: 86 B (always a substring ofraw_text)unshared
message_id/category/ path strings: about 144 B
What was changed¶
Plugin API 2:
load_and_parsereturnsIterator[Message]. API 1 plugins returning lists keep working. See Plugin API 2.Message model:
MessageandFileRefare@dataclass(slots=True)(FileRefis frozen).__post_init__coercesstart_line,end_lineandlinetoint. No Pydantic on the hot path.Windowed table: the TUI populates only a window of rows around the cursor,
max(3 × visible rows, 200), and re-windows centred on the cursor as it moves. The subtitle showsrow i of N.Waivers: matched once per message; redundant list copies removed.
Benchmarks¶
tools/bench/gen_xcelium_log.py: synthetic log generator.tools/bench/run_bench.py: size sweep, fresh subprocess per size, current RSS from/proc/self/statmplus peak.tools/bench/bench_message.py:Messageconstruction cost.
Current numbers¶
Action |
Before |
After |
|---|---|---|
Load |
9.7 s |
0.24 s |
Clear filter |
8.87 s |
0.12 s |
Sort |
8.93 s |
0.26 s |
Severity toggle |
6.66 s |
0.18 s |
RSS after table drawn |
332 MB |
158 MB |
At 1M messages:
parse: 3.5 s
load: 0.49 s
filter / sort / toggles: 0.36 to 0.70 s
RSS: about 550 MB after parse, 660 MB at end
A column store was also evaluated and not adopted; see Column-store investigation.