MUAZUABU
SENIOR MOBILE ENGINEER
.muazu
Performance
Sep 15, 2024

Hitting a Steady 60fps With a Custom Fabric Chart

Hitting a Steady 60fps With a Custom Fabric Chart

In a crypto app, the price chart is the surface people stare at, so any stutter is immediately obvious and immediately erodes confidence. Feeding a chart with live WebSocket data is exactly the workload that exposes performance problems, because updates arrive constantly and each one can trigger work across the whole render path.

A generic charting library could not keep up, so I built a custom chart directly on the Fabric renderer. Fabric lets the view update synchronously and stay off the old asynchronous bridge, which is what makes it possible to redraw at 60fps while data streams in. The rendering work stays close to the native layer where it belongs.

Data flow was the other half. I managed streaming prices with React Query so updates were coalesced and cached rather than triggering a re-render storm, and I kept the hot path free of allocation so the garbage collector never introduced a hitch. Hermes helped keep startup and memory predictable underneath it all.

The chart held a steady 60fps through live market movement, and the same discipline, keep expensive work off the JS thread, coalesce updates, and avoid allocation in the hot path, is what I reach for any time a React Native screen has to stay smooth under pressure.

more notes
.say hello

have a product to ship? i'm open for contract or full-time roles, let's talk about what i can take off your plate

contact me