-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong information in readme #4
Comments
Hi @rrousselGit , first of all thank you for opening this interesting issue, because the statement in readme isn't accurate. Yes, you're right, that's calling MaterialApp (or Cupertino, or WidgetsApp) | DarteaWidget | Some container / | \ Widget1 Widget2 Widget3 In this hierarchy only By Please correct me if I'm wrong, or if it's still unclear to you. |
I see, I misunderstood that part then.
One difference with Elm is that the browser only redraw what changed. In flutter this is not the case. If a single RenderObject update, the whole tree may repaint with it unless you add repaintboundaries. This may be fine for relatively small layouts. But I don't quite see it efficient for huge tree with thousands of widgets in it. Exposing the Model using an InheritedModelWidget would be much more efficient. |
I see what you mean. I believe that there should be performance degradation on a huge widgets tree, but still I want to try profiling and investigation first. I've tried Also I can try to add possibility to memoize results of |
After investigating a bit, it does seems like if no properties of any RenderObject change, then there's no paint step requested. And even if the widget itself change, it doesn't necessarily end with a layout step. So in the end, you are right, it does seem like if no RenderObject changes at all, "nothing" happens. It will still rebuild the whole tree, but not necessarily relayout and repaint everything. Anyway, I'd still suggest investigating the performance impact of rebuilding a tree of 600+ widgets. |
This isn't true.
First of all, a
setState
on the root widget doesn't rebuild the whole widget tree.Secondly, flutter doesn't do any sort of incremental change.
In flutter things are based around the class instance. If you reuse the same class instance as the old
build
call, flutter will stop any further build.Which is why the following:
will actually never force its child to rebuild even if it updates every frames.
The text was updated successfully, but these errors were encountered: