diff options
| author | blasty <blasty@local> | 2026-08-09 23:42:50 +0200 |
|---|---|---|
| committer | blasty <blasty@local> | 2026-08-09 23:42:50 +0200 |
| commit | c05631f8c01dd89f9430e94c88bf9671c15e6897 (patch) | |
| tree | c09b59db0ce5eb34dfd5ae24c02faaa58a17d08d /docs | |
| parent | remote_tools: hoist the IDAPython imports to module scope (~3%) (diff) | |
| download | ida-tui-c05631f8c01dd89f9430e94c88bf9671c15e6897.tar.gz ida-tui-c05631f8c01dd89f9430e94c88bf9671c15e6897.tar.xz ida-tui-c05631f8c01dd89f9430e94c88bf9671c15e6897.zip | |
remote_tools: delete a shadowed duplicate hiding an lru_cache landmine
_idatui_head_row and _idatui_line_parts were each defined TWICE at module
scope. Python keeps the last, so the first 74 lines were dead -- but the two
copies of _idatui_line_parts were not equivalent: only the live one carries
@lru_cache(maxsize=_IDATUI_LINE_CACHE).
That makes the duplication worse than clutter. Anyone tidying it up by
deleting the second copy would keep a byte-identical function and silently
lose the most important cache in the backend: 10.4us -> 3.9us per listing
row, ~2.7x on every row of every page. A comment now marks the spot and says
which copy to keep.
Found while profiling the digest; an AST duplicate-check reported the two as
IDENTICAL because ast.get_source_segment on a FunctionDef excludes the
decorator list. Compare decorators explicitly.
Verified before deleting: the block defines only names redefined below, and
nothing above it referenced them. Behaviour unchanged -- heads(500) still
9.3ms, digest still stable, and the expect/short-circuit contract still
omits rows on a match and returns them on a miss.
Full gate: 1042 passed.
Diffstat (limited to 'docs')
0 files changed, 0 insertions, 0 deletions
