Skip to content

don't precompile dependencies when building the flutter tool#42771

Merged
jakemac53 merged 1 commit intoflutter:masterfrom
jakemac53:flutter-tool-no-precompile
Oct 15, 2019
Merged

don't precompile dependencies when building the flutter tool#42771
jakemac53 merged 1 commit intoflutter:masterfrom
jakemac53:flutter-tool-no-precompile

Conversation

@jakemac53
Copy link
Copy Markdown
Contributor

@jakemac53 jakemac53 commented Oct 15, 2019

Description

Pub by default creates a snapshot of all executables from all direct dependencies on pub get/upgrade which is slow.

To make things worse, since flutter_tool pins all transitive deps that means it compiles all transitive executables since they all look like immediate deps.

Passing --no-precompile speeds up the pub get/upgrade step for flutter tool significantly by skipping this precompile step.

Timing breakdown

Without --no-precompile:

real 0m20.911s
user 1m38.711s
sys 0m4.446s

With --no-precompile:

real 0m6.257s
user 0m1.756s
sys 0m0.167s

These differences will be a lot more pronounced on machines with fewer cores as well.

Breaking Change

Does your PR require Flutter developers to manually update their apps to accommodate your change?

  • Yes, this is a breaking change (Please read [Handling breaking changes]). Replace this with a link to the e-mail where you asked for input on this proposed change.
  • No, this is not a breaking change.

Copy link
Copy Markdown
Contributor

@jonahwilliams jonahwilliams left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!!!!!

@jakemac53 jakemac53 merged commit 3f1f22c into flutter:master Oct 15, 2019
@jakemac53 jakemac53 deleted the flutter-tool-no-precompile branch October 15, 2019 20:34
Inconnu08 pushed a commit to Inconnu08/flutter that referenced this pull request Nov 26, 2019
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Aug 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants