# 8x Performance Gain: Migrating RPG Engine from Jetpack Compose to Google Filament

Developer shares optimization journey by adopting hybrid rendering architecture.

- **Source:** [Developing Android Apps](https://brifing.si/source/aa76b6c1-28c1-49f8-967e-b6a0eeadfa86)
- **Published:** 2026-07-24
- **Topic:** [Software & Engineering](https://brifing.si/c/engineering)
- **Original article:** <https://www.reddit.com/r/androiddev/comments/1v5a23f/reaching_the_limits_of_jetpack_compose_canvas/>
- **On Brifing:** https://brifing.si/s/ada9d32f-9d41-42c1-85f2-393d14dbcd04

## Hitting Jetpack Compose Limits

The developer initially built the RPG engine with Jetpack Compose Canvas. However, as world maps and visual effects grew, performance bottlenecks emerged. Heavy CPU-side optimizations (map chunking, visibility culling) couldn't maintain the 16ms frame budget.

## Birth of Hybrid Architecture

Seeking a solution without breaking the live game, the developer adopted a phased approach. They rendered the game world in 3D via Google Filament while keeping UI and character animations in Compose Canvas. This hybrid strategy minimized risks during transition.

## Technical Advantages of Filament

Migration to Filament enabled batched GPU rendering. The old system's 16-chunk map division and CPU culling logic were completely removed. The entire map now renders in a single pass without frame drops.

## Revolution in Visual Effects

Filament's .filamat material/shader system unlocked rich particle effects and dynamic lighting impossible on 2D Canvas. By writing GPU-executed shaders, the developer significantly enhanced visual quality.

## Main Thread Relief

Offloading world rendering from Canvas layer greatly reduced CPU/main thread load. This allowed smooth operation of 28 ECS systems, UI updates, and character animation calculations.

## Best of Both Worlds

The hybrid architecture combines 3D GPU engine performance with Jetpack Compose's rapid UI development advantages. The developer emphasizes this transition permanently solved scalability issues and paved the way for new features.

## Sources covering this story

- https://www.reddit.com/r/androiddev/comments/1v5a23f/reaching_the_limits_of_jetpack_compose_canvas/ — 

---

_Summary written by Brifing from the original reporting. Copyright in the original article belongs to its publisher; read the full piece at the link above._
