aboutsummaryrefslogtreecommitdiffstats
path: root/idatui
diff options
context:
space:
mode:
authoruser <user@clank>2026-08-07 02:07:28 +0200
committeruser <user@clank>2026-08-07 02:07:28 +0200
commit8b40fd299827d3685499392cce27d20451e94211 (patch)
tree21569e9881909f9660ecb1538ce291906d388095 /idatui
parentIncremental search narrows instead of rescanning. Typing a character onto the... (diff)
downloadida-tui-8b40fd299827d3685499392cce27d20451e94211.tar.gz
ida-tui-8b40fd299827d3685499392cce27d20451e94211.tar.xz
ida-tui-8b40fd299827d3685499392cce27d20451e94211.zip
Three micro-wins on the listing-row path: merge the colour-tag and operand-tag dicts into one lookup, skip both isspace() probes when a span needs no whitespace collapsing at all (the common case), and give Head slots=True. Spans 11.07 -> 10.18 us/line; Head construction 3.18 -> 2.53 us/row.
Result: {"status":"keep","total_ms":20412.8,"lg_boot_ms":752.9,"lg_decomp_ms":2418.6,"lg_graph_ms":811.6,"lg_hex_ms":1020.1,"lg_index_ms":73.2,"lg_listing_cold_ms":573.7,"lg_listing_warm_ms":456.7,"lg_nav_ms":6640.1,"lg_palette_ms":4.8,"lg_render_ms":237.6,"lg_search_ms":3210.2,"pure_graph_ms":242.5,"sm_boot_ms":536.5,"sm_decomp_ms":643.1,"sm_graph_ms":689.8,"sm_hex_ms":866.6,"sm_index_ms":0,"sm_listing_cold_ms":262.9,"sm_listing_warm_ms":265.9,"sm_nav_ms":330.1,"sm_palette_ms":0.3,"sm_render_ms":265.2,"sm_search_ms":110.5,"fails":0}
Diffstat (limited to 'idatui')
-rw-r--r--idatui/domain.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/idatui/domain.py b/idatui/domain.py
index 1c7883f..645d111 100644
--- a/idatui/domain.py
+++ b/idatui/domain.py
@@ -90,10 +90,16 @@ class Line:
)
-@dataclass(frozen=True)
+@dataclass(frozen=True, slots=True)
class Head:
"""One flat-listing item (from the ``heads`` server tool): a code
- instruction, a data item, or an undefined byte run."""
+ instruction, a data item, or an undefined byte run.
+
+ ``slots=True`` because this is the most-constructed object in the codebase:
+ a jump to an address near the end of a big binary builds one per listing row
+ it walks past, hundreds of thousands of them, and the slotted layout is ~20%
+ cheaper to build (and smaller to hold).
+ """
ea: int
kind: str # 'code' | 'data' | 'unknown' | 'member'