Skip to content

Conversation

@chinmaygarde
Copy link
Member

@chinmaygarde chinmaygarde commented Apr 21, 2025

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.

…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.
@github-actions github-actions bot added engine flutter/engine related. See also e: labels. e: impeller Impeller rendering backend issues and features requests labels Apr 21, 2025
Copy link
Member

@gaaclarke gaaclarke left a 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.

@chinmaygarde chinmaygarde added the autosubmit Merge PR when tree becomes green via auto submit App label Apr 21, 2025
@auto-submit auto-submit bot added this pull request to the merge queue Apr 23, 2025
Merged via the queue into flutter:master with commit 5896cef Apr 23, 2025
179 checks passed
@flutter-dashboard flutter-dashboard bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Apr 23, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 23, 2025
@chinmaygarde chinmaygarde deleted the fasterincbuilds branch April 23, 2025 18:28
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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants