Files
ai-app/app/androidApp
irisandClaude Opus 5 76c51117d6 Parse ahead on two threads, not on every core
The frame is now failing to *start* rather than taking too long once it
has: 21ms of `waited` at the 90th percentile against a median frame of
8.8ms that is inside budget. What is holding it up arrives with a page
of history -- 1.5 seconds of markdown parsed in a twelve second scroll,
all of it work nobody is waiting for.

Off the composing thread was the right call and it is not the same as
free. The default dispatcher sizes itself to the machine, which is right
for work somebody is waiting on: a page's worth of parses takes every
core, and the thread that draws the frame queues behind one of them. Two
threads, and a yield between messages, leaves the phone somewhere to run
the frame.

Nothing here makes the parsing faster, and it should not: the whole
point of doing it ahead is that its duration does not matter. What
matters is that it stops being in the way.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-31 02:55:52 -04:00
..