Trying experimental performance work #3834
Replies: 10 comments 39 replies
-
@gmpassos wrote: I’ve added your NOTE: This is a preliminary benchmark and should not be considered final until all optimizations are fully implemented. To force a full build, I’m running the following commands on macOS:
|
Beta Was this translation helpful? Give feedback.
-
it is failed
|
Beta Was this translation helpful? Give feedback.
-
Hey @davidmorgan, thanks for your work here. I'm sure I speak for a lot of folks in saying that it's exciting to see work going towards Just wanted to add results from my project here, in case they might be helpful. These results come from https://github.com/anthem-audio/anthem/. Some notes about my usage of
If you want to reproduce these tests, you can clone the repo above, and do the following:
I am running these tests on Windows 11 / x64. Current resolverBelow are timing results from a few runs, with the current behavior. Here is the command I'm running:
I am making trivial edits to And the results:
I find the decreasing actions here interesting, though I haven't paid much attention to this before and it may be normal. I ran a Experimental resolverHere's the command I'm using for the experimental resolver:
And the results:
|
Beta Was this translation helpful? Give feedback.
-
I'd say I'm about 70% of the way through the refactoring needed before I can make real performance improvements :) ... you can see from the stream of PRs what I meant when I said it's complicated ;) Right now it should actually be a bit slower than before. But still I'd appreciate some test runs please, to check whether I broke anything :) ... the refactoring affects both running with and without The latest hash for your Thanks :) |
Beta Was this translation helpful? Give feedback.
-
#3996 is, finally, the refactoring that I've been aiming for this whole time :) The I'd be interested to hear how much difference this makes if anyone wants to test it. There should still be performance improvements coming up, in fact it's possible I made performance worse for some cases; now that the scalability issue is (hopefully) under control I can start to look at where the processing time that remains is going, and to make more targeted improvements. |
Beta Was this translation helpful? Give feedback.
-
Hey @davidmorgan, great to see more progress on this. I'm starting a new thread to report my test results against the latest changes to avoid cluttering the other thread. I'm testing against 33a0a24. See above for details on reproducing this test. I am running on the
Before:
After:
|
Beta Was this translation helpful? Give feedback.
-
The fix for the OOM found by amrgetment is now merged. So is adding back write caching, so that files are written at the end of the build, instead of during the build as they are generated, which may help the user experience by causing the IDE to notice the changes all together instead of one by one. New latest hash :) ed8075f I'm currently planning to do two things before preparing a release: 1) improve logging so it's clearer where the time is being spent; and 2) some stress testing to see if I can catch any further issues before the release. |
Beta Was this translation helpful? Give feedback.
-
Heya, just some additional data: we've been seeing very long build times since upgrading to Thanks so much for the big improvement. I'm sure there's more to add, but from my perspective, 🐑 🇮🇹 ! |
Beta Was this translation helpful? Give feedback.
-
Not sure why I am not seeing the noticeable improvements some mentioned in this topic: The repository is not public, but if there’s a way to share it privately with a team member, I’d be happy to do so. |
Beta Was this translation helpful? Give feedback.
-
Hey! Just providing a benchmark from my side :) Using the effc827 commit from #3834 (comment), here are my results, in a medium/big-sized production commercial app using plenty of code-generation. Macbook Pro M1 Pro 32GB (with other apps in the background, same in all runs). Flutter 3.29.3. On the effc827First buildI've added dependency overrides and ran
Consecutive build
It took much more time. I did not add
Again slower, let's try again:
Slower :/ On "normal" build_runnerlockfile
First build
Consecutive builds
|
Beta Was this translation helpful? Give feedback.
-
Forked from #3800, "Discussions" seems a better place for people to add feedback, so let's try it here :)
@gmpassos it will be annoying to try without a flag; a flag will also be useful for me, so I'll look at adding one #3831.
In terms of feedback, performance measurements are actually not particularly useful yet as I still have a lot to do there :) but it would be helpful for people to start checking to see if I actually broke something, i.e. if the new version is incorrect somehow.
Here are dependency overrides that use my PR adding the flag, so if you put this in your
pubspec.yaml
and pass--use-experimental-resolver
when you runbuild_runner build
orbuild_runner watch
then that's the new codepath :)EDIT: for the latest version, the hash to use in "ref" below is effc827, and there is no
--use-experimental-resolver
flag. When comparing with the old version, take care to consider both clean and incremental (build, change file, rebuild) as these are very different for performance.Beta Was this translation helpful? Give feedback.
All reactions