<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ida-tui.git/experiments/profile_client.py, branch main</title>
<subtitle>tui for headless ida</subtitle>
<id>https://git.sl0p.foo/ida-tui.git/atom/experiments/profile_client.py?h=main</id>
<link rel='self' href='https://git.sl0p.foo/ida-tui.git/atom/experiments/profile_client.py?h=main'/>
<link rel='alternate' type='text/html' href='https://git.sl0p.foo/ida-tui.git/'/>
<updated>2026-08-09T22:40:28Z</updated>
<entry>
<title>domain: build Head positionally, and drop a dead test from _as_int</title>
<updated>2026-08-09T22:40:28Z</updated>
<author>
<name>blasty</name>
<email>blasty@local</email>
</author>
<published>2026-08-09T22:40:02Z</published>
<link rel='alternate' type='text/html' href='https://git.sl0p.foo/ida-tui.git/commit/?id=528f4fe1d4877b24208e9bd87ee15d1ac8a363ed'/>
<id>urn:sha1:528f4fe1d4877b24208e9bd87ee15d1ac8a363ed</id>
<content type='text'>
Head is the most-constructed object in the codebase -- 227k of them to stream
one bash -- and from_raw was paying for two things it did not need.

_as_int ended in a ternary whose arms were BOTH int(v, 16), so the
isinstance+startswith in front of them decided nothing and ran on every
address the client parses (55k times per 60 pages). Removed; the function is
now the isinstance it always was.

Head(...) was built by keyword, which makes the tuple match names against
fields; positional is the same object with none of that. Address conversion
is inlined for the same reason from_raw exists at all.

Together 30% off Head construction (2.27 -&gt; 1.59ms per 2003 rows, 0.34us a
row), with output verified identical against the previous implementation over
both skeleton and full rows. isinstance was kept over the 5%-faster
"type(v) is int" because the two differ for bool and int subclasses, and that
is not a trade worth making for 5% of 12% of a page.

End to end this is ~2.5% of bash's boot (3117 -&gt; 3065ms): Head construction
was ~12% of the client half, and the client half is ~54% of what is left.

Adds experiments/profile_client.py -- profile_remote.py's counterpart for the
half of a page load that happens outside the database process, which is where
the remaining time now is.

Full gate: 1050 passed.
</content>
</entry>
</feed>
