Async keyword doesn't unblock CPU
An AI wrote this Flutter code to parse and process a large analytics payload, claiming it 'runs in the background with async'. The UI still freezes for ~600ms when it runs and the frame counter drops to zero during the parse. Why doesn't `async` help here, and how would you fix it?
Implement
count_dropped_frames(chunk_costs_ms: list[int], mode: str, frame_budget_ms: int) → intExamples
in
[[120,90,300,90],"async_only",16]out37in
[[120,90,300,90],"isolate",16]out0in
[[120,90,300,90],"yield_between",16]out35What a strong answer looks like
Treat the AI’s output as a draft to verify, not an answer to trust. Name the specific flaw and the input that triggers it, say how you’d catch it (tests, edge cases, reading critically), and how you’d re-prompt or decompose to get it right.
0:00 of about 19 min
Vibe & agentic: describe the solution in plain language (or narrate it) and the coach grades your approach.
Which questions mattered is sealed until you submit. Telling you now would just be handing over the edge cases.
Run or narrate your approach, then ask the coach.