Insurance apps have a dirty little secret: they're often slow, memory-hungry, and prone to freezing at the worst moments—right when a customer is trying to file a claim or check coverage. The blame usually falls on clunky legacy code or an overstuffed feature set, but the real culprit might be the way your team builds for multiple platforms.
If you're maintaining separate Android, iOS, and maybe even a HarmonyOS app, you're paying for that fragmentation in developer hours, infrastructure, and customer frustration. But there's a better way. Recent engineering work on cross-platform frameworks—especially KMP and Flutter—has produced dramatic improvements in memory usage and garbage collection (GC) stalls. For insurers, that could mean a 95% reduction in rendering memory and a 90% drop in GC-induced lag. That's not just a tech win; it's a customer experience win.
Why Insurance Apps Need to Care About Performance
Insurance is a trust business. When a user opens your app to check a policy or start a claim, they expect it to work instantly. A 200-millisecond hesitation might not seem like much, but in mobile, that's several dropped frames. And if the app freezes for a full second while the garbage collector runs, you've lost that customer's patience—and maybe their business.
Traditional cross-platform approaches often made things worse. React Native, for example, relied on JavaScript bridges that added overhead and caused stutters during high-frequency interactions. Flutter improved on that with self-rendering, but it came with its own costs: bigger binaries, higher memory use, and a wall between Flutter UI and native components.
For insurers, who often need to embed native camera, GPS, or biometric features, that wall becomes a headache. You end up writing platform channels and serialization code that eats into your performance budget.
KMP: Sharing Logic Without Sacrificing Native Feel
Kotlin Multiplatform (KMP) takes a different route. Instead of trying to unify UI across platforms, it focuses on sharing business logic—the stuff that powers your policy calculations, claims processing, and risk assessments. That logic lives in a common module, while each platform provides its own UI layer. This way, you get the efficiency of a single codebase for the heavy lifting, but you keep the native look and feel that users expect.
KMP's expect/actual mechanism lets you define a common interface and then provide platform-specific implementations. That means you can share as much or as little as you want. It also compiles directly to native binaries, so performance is close to what you'd get with fully native code. In some cases, it's even faster.
How HarmonyOS Adapted KMP to Cut Memory and GC Stalls
Huawei's HarmonyOS team has been working with partners to make KMP production-ready on its platform. Early on, they hit a wall: the GC algorithm KMP used was similar to the old CMS collector—it caused long pauses and fragmented memory. When the heap became a patchwork of tiny holes, the system had to stop the world and compact everything, leading to stalls of 50 to 100 milliseconds. That's a deal-breaker for a claims form.
Their solution was a new GC algorithm called CMC. It splits the heap into regions based on object size and assigns separate threads to manage each region, boosting concurrency. It also uses stack maps to track object references, allowing the runtime to safely move objects during GC. That means compacting happens continuously, not as a last-resort big cleanup. Think of it as tidying your house daily instead of waiting until you can't walk through the living room.
The results were stark: rendering memory dropped by 95%, and GC-induced frame stalls fell by 90%. For an insurance app, that's the difference between a smooth scroll through your policy list and a frozen screen that makes you wonder if the app crashed.
Flutter's Impeller and Shared Memory: Fewer Janky Moments
Flutter, the other major cross-platform player, has also made strides. Its Impeller renderer pre-compiles shaders at build time, eliminating the 100–200ms shader compilation jank you'd see on first launch with Skia. That's a huge win for insurance apps that need to render complex charts or PDFs quickly.
HarmonyOS also introduced a shared memory mechanism for external textures. When you're displaying camera feeds or video (think video-based claim submission), the system used to copy buffers between GPU contexts, which was expensive. Now, both rendering pipelines share the same memory, reducing overhead and solving stutter issues in real-time communication scenarios.
Practical Advice for Insurance Tech Teams
So what should you do if you're an insurance CTO or lead engineer?
- Audit your current app for memory and GC stalls. Use profiling tools to see where the jank happens. If you're seeing long pauses, it's time to consider a framework change.
- Consider KMP for shared logic, especially if you're targeting Android, iOS, and HarmonyOS. It lets you write your business logic once, and you can keep native UI where it matters.
- Don't assume Flutter is out of the picture. If you value UI consistency and can tolerate slightly higher memory use, Flutter's Impeller improvements might be enough. But be aware that self-rendering still has a memory cost—roughly 70MB per page on a 1080p phone.
- Think about AI coding tools. They can generate native code faster than ever, but they still need a coherent framework to work with. KMP's shared logic model is a natural fit for AI-assisted development, because you're generating code once for all platforms.
The Bottom Line: Performance Is an Insurance Feature
In an industry where trust is everything, a slow or buggy app erodes confidence. The good news is that modern cross-platform frameworks have closed the gap with native performance. KMP's logic sharing and HarmonyOS's GC improvements mean you can build once and run everywhere without sacrificing speed. And Flutter's Impeller makes even complex UIs feel snappy.
Don't wait for your users to complain about lag. Start profiling your app today, and see if a switch to KMP or a Flutter optimization is in order. Your customers—and your bottom line—will thank you.
Comments (0)
Please sign in to post a comment.
Don't have an account? Create one
No comments yet. Be the first to comment!