Skip to content
YA
All writing
Jetpack ComposeUnpublished1 min read

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