diff options
| author | blasty <peter@haxx.in> | 2026-08-09 23:35:32 +0200 |
|---|---|---|
| committer | blasty <peter@haxx.in> | 2026-08-09 23:35:32 +0200 |
| commit | 0f60e84f9d753ba0a6aa33076ebeb7fd4068238e (patch) | |
| tree | 14d64a2ae52592a2dca892dd8cd48166b2188d67 /README.md | |
| parent | experiments: count backend round-trips per user action (diff) | |
| download | ida-tui-0f60e84f9d753ba0a6aa33076ebeb7fd4068238e.tar.gz ida-tui-0f60e84f9d753ba0a6aa33076ebeb7fd4068238e.tar.xz ida-tui-0f60e84f9d753ba0a6aa33076ebeb7fd4068238e.zip | |
remote_tools: hoist the IDAPython imports to module scope (~3%)
_idatui_head_row ran 'import ida_bytes/ida_lines/ida_name' on every LISTING
ROW -- 25,500 sys.modules lookups per 500-row page. 50 such imports across
the file, all pointless: this module is never imported by the client
(codemode_client reads it as TEXT and installs it in the database process),
so the no-IDA house rule that forces function-local imports elsewhere does
not apply here.
Measured honestly, it is worth about 3%: heads(500) best-of-40 goes
9.37ms -> 9.07ms, median 9.73 -> 9.65. A microbenchmark of the bare import
predicted 3.2ms/page and was 10x optimistic -- the A/B is what counts, and
it is a small win, not the big one.
ida_hexrays deliberately stays function-local: it is licence-dependent, and
hoisting it would break the whole remote library for someone without the
decompiler rather than failing only when they decompile. Verified by AST
that every ida_* reference still resolves.
Adds experiments/profile_remote.py, which ships cProfile INTO the database
process -- the only way to see the split between IDA's own calls and our
python, which no client-side timer can show.
Full gate: 1042 passed.
Diffstat (limited to 'README.md')
0 files changed, 0 insertions, 0 deletions
