3 ms·
Let me see if I can explain it - These "declarative" UI frameworks work very different from any UI frameworks in the past. They (theoretically) rebuild the data
by harikb 3y ago
Let me see if I can explain it - These "declarative" UI frameworks work very different from any UI frameworks in the past. They (theoretically) rebuild the data structures backing the current view of the UI and do that 60+ frames per second.
Good thing is that there is very little chance of data-out-of-sync-with-UI kind of bugs. But the bad part is that tons and tons of alloc/dealloc and literally the code is executing all the time.
Now in practice, it is not all that bad. They have a magical garbage collector that makes is all better. Every release it just slightly better, but I can't help think that they are solving a problem they created to begin with. But I might be too old and may be the productivity is worth it.
This is in addition to the fact that none of the widgets are truly native. The "code" is native, but the UI is not. Even react-native apps might be this way, but they at least use Safari/webkit widgets, if not truly native iOS/Android widgets.
- Alifatisk 3y ago> But the bad part is that tons and tons of alloc/dealloc and literally the code is executing all the time. Considering what you said, it's quite impressive that Flutter is able to perform this well and render thousands of widgets per second. https://youtu.be/pD38Yyz7N2E?si=7jTaQdX9ln37_fHR&t=3052 https://youtu.be/pD38Yyz7N2E?si=7jTaQdX9ln37_fHR&t=3052
- remram 3y agoThousands is supposed to be a lot? Also what if I want to run other apps at the same time? They better not have too many widgets of their own?
- Alifatisk 3y agoYou don’t think rendering thousands of widgets per second is a lot? Regarding your other question, I don’t know.
- remram 3y agoNo, I really don't. In fact I think rendering merely thousands of widgets in a second would be very slow for a JavaScript framework using the DOM.
- Alifatisk 3y ago> In fact I think rendering merely thousands of widgets in a second That's not what I'm saying. I'm saying rerendering and updating the state of thousands widgets PER second.
- DrDeadCrash 3y ago60 times per second*
- Alifatisk 3y agoYou're right, it updates all those widgets 60 times per second, that's even more.
- remram 3y agoYes got it, and this is a very very low number, no matter how many times you repeat it.
- Alifatisk 3y agoOh okey, I just wanted to be sure we were on the same page. I guess my idea of good performance has been way far off and Flutter is actually performing way worse compared to others. I did some Googling but could only find comparisons with RN and sometimes with Swift, but not with any of the web frameworks.