Benchmark before you believe
SurfaceView is for games and Compose is for UI — until you measure both on a mid-range phone.
This article is a draft based on real project decisions and is awaiting the author's review.
CodePort renders a living isometric city. The budget: 8 ms per frame for ~300 entities, on a Snapdragon 6 Gen 1.
Two hosts, one renderer
Both a Compose Canvas host and a SurfaceView host were built around the same renderer and the same deterministic world, then run through 4 scenarios × 3 cold runs.
Scenario CPU p95 (ms) jank
A normal 0.90–1.43 0.00%
B normal 6.36 0.51%
A stress 2.53–2.69 0.17–0.34%
B stress 9.32–9.85 1.19–1.53%Result
Compose Canvas won on every axis. The technique mattered more than the host: bake static art into atlas pages once, then draw with zero allocations per frame.
Related reading
Let the model write. Let code decide.
How Wakeel keeps a language model from creating sales leads nobody agreed to — and why the same rule shapes every AI feature I build.
RTL is not a mirror
Clipped descenders, six plural forms and Arabic-Indic digits: what Arabic-first really means in an Android app.