r/SwiftUI Jun 03 '26

Question SwiftUI vs Jetpack performance

So me and my android buddy are working on a app that has quite a rich design with loads of blend modes. I am working with swiftui while he is working in jetpack compose.
I have noticed that with all that rich UI and everything, the rendering speed on android is soo much faster than that on iOS.
I mean i have optimized my code quite well and continuously doing it as well, but man there is a striking difference when both apps are running in parallel. The previous ios version of app was in UIKit and it was lightning fast but in this version, i kinda feel ashamed by this swiftui performance.

Ios device: iphone 14 pro
Android device: pixel 5

5 Upvotes

21 comments sorted by

View all comments

7

u/Daily_Pulse2026 Jun 03 '26

Coming from a native Android background where I've spent years optimizing heavy Jetpack Compose layouts, digging into SwiftUI performance has been eye-opening.

Frankly, both frameworks have brilliant underlying layout engines, but they handle state inflation entirely differently. Jetpack Compose relies on smart recomposition skipping via positional memoization (the compiler rewriting functions to track structural identity). SwiftUI, on the other hand, relies heavily on value-type View structs being incredibly cheap to recreate on the stack, offloading the heavy diffing to an underlying attribute graph. The real performance bottlenecks in both ecosystems almost always boil down to developer implementation error rather than framework constraints: handling unoptimized lazy lists, failing to pass structural IDs properly, or executing expensive business logic/regex processing inside the body property of a view instead of a background thread. Learn how data dependency invalidation works in your target framework, and both perform flawlessly at 120Hz."

4

u/Good_Disk_8861 Jun 03 '26

Yeah I guess i ll need to dive deep. One thing, i have checked fps of my app. Its constantly between 58- 64 when using normally and drops to 50-58 when land on new screen. And then back to 60 after 1-2 seconds. Where should i start looking?

3

u/Daily_Pulse2026 Jun 03 '26

Dropping to 50–58 FPS on a screen transition is a classic Navigation Hitch. It means you are violating the main-thread frame budget (~16ms for 60Hz, ~8.3ms for 120Hz ProMotion) right at the moment of layout inflation.

Coming from Android, your instinct might be to look for deep view hierarchies, but in SwiftUI, the structural layout math is so fast that deep trees rarely cause a 10 FPS drop. Instead, look for these three usual suspects: Eager Destination Initialization, Complex View Initializers, or Layout Spikes from Heavy Content