by melony · 4y ago · 0 comments
Discussion on Flutter Performance at r/cpp is enlightening: https://www.reddit.com/r/cpp/comments/u0ut2a/comment/i4b0lqt...
> "Unfortunately, Flutter is currently a pile of hot garbage from the performance PoV.
> Their own Hello World example, which has one animated button on screen, which updates the label when you press it (see their screenshot) in Release manages to stutter on Moto G7 Power, a phone from 2019. Which smoothly runs quite demanding 3D games.
> According to Android Studio's profiler, about 20% of the frames do not fit into the time slot when the button is pressed. I don't know how did they manage to achieve this with such a trivial example on a Snapdragon 632, but they did it. So, to run smoothly on not-latest phones, your app should somehow be even simpler than their Hello World example, which seems hard to do.
I am not a smartphone dev. So I don't care either way. But I want to see a proper benchmarking. Not another internet hot take.
If a current generation flagship phone struggles, then I just can’t imagine how a more affordable phone that is a couple years old would fare.
See Google’s own Google Pay app as an example. Its performance is unforgivably bad. Perhaps it runs better on Android, but on iOS it feels bad.
The hype around performance is (I think) because it uses lower level rendering stack and a AOT compiler, but the comparision is being made mainly to JavaScript and web stack tech.
It could be fast as rendering speed depends mainly on how quickly can you rasterize and compose the graphic to the canvas. It uses Skia as the graphics backend, but Skia, while being very feature rich, is not the fastest. Dart is also not the fastest language around, but it has a lot of headroom for optimization. I'm also a bit skeptical about the performance impact of the immutable widgets tree, but maybe it doesn't have such a big performance impact as I imagine.
Overall, Flutter has potential to be quite fast. But currently, due to various issues, it's often not. I do love it though, due to how flexible is the rendering and due to the fact there is no markup language. It's really a joy to work with.
I think these statements are true for any application framework