Revolut Sep 29, 2020

Custom View from Scratch Part III: Performance and Optimisation

Article Summary

Eugene Zubkov from Revolut hit a wall building a custom Android chart: it literally disappeared due to texture size limits. His debugging journey reveals critical performance traps most Android devs don't see coming.

This is Part III of a deep-dive series on building custom Android views from scratch. Zubkov tackles the performance bottlenecks that emerge when Path rendering exceeds GPU texture limits (16384x16384 on most devices), causing views to vanish entirely.

Key Takeaways

Critical Insight

Moving from Path-based rendering to primitives and TextureView threading solved the texture overflow crash while dramatically improving frame rates.

The article includes profiler screenshots showing the exact performance delta and a complete TextureView implementation pattern you can adapt immediately.

Recent from Revolut

Related Articles