-
Notifications
You must be signed in to change notification settings - Fork 29.7k
[Impeller] Make incremental builds faster when tinkering on the compiler. #167492
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ler. GN set the Ninja `restat` argument to 1 by default. Which means that it notes the modification timestamp when writing the contents. Its man page states "Scripts can improve build performance by taking care not to change the timstamp of the output file(s) if the contents have not changed.". Modifying the compiler will now still re-compile shaders. But if the shaders have not changed, downstream edges will be culled. This can be observed in the Ninja progress update after this change. After editing any file in the compiler, Ninja start out with `(2/866) LINK ./impellerc`. But as it culls edges, it skips tasks and ends with `(454/455) ACTION //flutter/...`. More than half the edges are culled. More importantly, the unit-tests edges are culled as well. For workflows where only the changed tests are run, this saves a ton of test time in addition to build time.
gaaclarke
approved these changes
Apr 21, 2025
Member
gaaclarke
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I ran this through my head a bit. I think this is safe to do and it was a pain previously. I've complained about this but I don't think I filed an issue, thanks chinmay.
jason-simmons
approved these changes
Apr 21, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Apr 23, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Apr 23, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Apr 24, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Apr 24, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Apr 24, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Apr 24, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
May 2, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
May 3, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
May 3, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
May 4, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
May 5, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
May 5, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
May 5, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
May 5, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
May 5, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
May 5, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
May 5, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
May 5, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
May 6, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
May 6, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
May 6, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
May 6, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
May 7, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
May 7, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
May 7, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
May 7, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
May 7, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
May 7, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
May 7, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Aug 14, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Aug 14, 2025
romanejaquez
pushed a commit
to romanejaquez/flutter
that referenced
this pull request
Aug 14, 2025
…ler. (flutter#167492) GN set the Ninja `restat` argument to 1 by default. Which means that it notes the modification timestamp when writing the contents. Its man page states "Scripts can improve build performance by taking care not to change the timstamp of the output file(s) if the contents have not changed.". Modifying the compiler will now still re-compile shaders. But if the shaders have not changed, downstream edges will be culled. This can be observed in the Ninja progress update after this change. After editing any file in the compiler, Ninja start out with `(2/866) LINK ./impellerc`. But as it culls edges, it skips tasks and ends with `(454/455) ACTION //flutter/...`. Around half the edges are culled. More importantly, the unit-tests edges are culled as well. For workflows where only the changed tests are run, this saves a ton of test time in addition to build time.
romanejaquez
pushed a commit
to romanejaquez/flutter
that referenced
this pull request
Aug 14, 2025
…he compiler." (flutter#167965) Reverts flutter#167492 Makes things slower if the sources are newer than the outputs.
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Aug 15, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Aug 15, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Aug 16, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
e: impeller
Impeller rendering backend issues and features requests
engine
flutter/engine related. See also e: labels.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
GN set the Ninja
restatargument to 1 by default. Which means that it notes the modification timestamp when writing the contents. Its man page states "Scripts can improve build performance by taking care not to change the timstamp of the output file(s) if the contents have not changed.".Modifying the compiler will now still re-compile shaders. But if the shaders have not changed, downstream edges will be culled.
This can be observed in the Ninja progress update after this change. After editing any file in the compiler, Ninja start out with
(2/866) LINK ./impellerc. But as it culls edges, it skips tasks and ends with(454/455) ACTION //flutter/.... Around half the edges are culled. More importantly, the unit-tests edges are culled as well. For workflows where only the changed tests are run, this saves a ton of test time in addition to build time.