Skip to content

Would be nice if flutter run only downloaded the necessary artifacts #6491

Description

@eseidelGoogle

I was on a train with bad wifi. It was painful.

I was trying to run the gallery on an iOS Simulator.

%flutter run
Building flutter tool...
Downloading package sky_engine...                    8101ms
Running 'pub get' in sky_engine...                   450ms
Downloading package sky_services...                  596ms
Running 'pub get' in sky_services...                 3139ms
Downloading package flutter_services...              1929ms
Running 'pub get' in flutter_services...             2294ms
Building Dart SDK summary...                         1753ms
Downloading engine artifacts android-arm...          177027ms
Downloading engine artifacts android-arm-profile...  164117ms
Downloading engine artifacts android-arm-release...  115925ms
Downloading engine artifacts android-x64...          78964ms
Downloading engine artifacts android-x86...          78600ms
Downloading engine artifacts ios...                  178979ms
Downloading engine artifacts ios-profile...          189778ms
Downloading engine artifacts ios-release...          152586ms
Downloading darwin-x64 tools...                      232022ms
Downloading android-arm-profile/darwin-x64 tools...  34656ms
Downloading android-arm-release/darwin-x64 tools...  139862ms
Running 'pub get' in flutter_gallery...              870ms

FYI @danrubel

Activity

  1. added
    toolAffects the "flutter" command-line tool. See also t: labels.
    on Oct 24, 2016
  2. eseidelGoogle commented on Oct 29, 2016

    @eseidelGoogle
    ContributorAuthor

    We've had a couple complaints about downloads being slow or not resuming well from users in china who have network issues. Unclear if this specific bug would help them though.

  3. added this to the milestone on Nov 15, 2016
  4. olostan commented on Nov 15, 2016

    @olostan

    Faced same issue when decided to do some coding in airport while waiting for the flight. Had to restart downloading couple of times, downloads were failing.

    As an idea (except limitation of needed resources) - may be download in parallel? Sometimes on bad connections that helps.

  5. Hixie commented on Dec 9, 2016

    @Hixie
    Contributor

    I just had this with flutter analyze. There's really no reason to download an ARM engine if I want to analyze things... especially when I'm in a rush.

    cc @danrubel @devoncarew @jason-simmons

  6. eseidelGoogle commented on Feb 17, 2017

    @eseidelGoogle
    ContributorAuthor

    The flutter-intellij plugin has considered even working around this issue themselves: flutter/flutter-intellij#730

  7. xster commented on Jul 24, 2017

    @xster
    Member

    Hard to work on flutter tools too on slow networks. Each dev cycle involves changing some code of the tools, clear the tool's snapshot but building the new flutter tools is a network dependent operation which can take a while.

  8. eseidelGoogle commented on Jul 24, 2017

    @eseidelGoogle
    ContributorAuthor

    I'm confused. Rebuilding the flutter_tools snapshot shouldn't involve the network. Only downloading the engine artifacts should?

  9. Hixie commented on Nov 21, 2017

    @Hixie
    Contributor

    This would also solve the issue where "flutter upgrade" fails because you're on a version that is unable to download all the artifacts for whatever reason (e.g. we failed to upload them).

  10. modified the milestones: 3: Current Milestone, on Nov 21, 2017
  11. Hixie commented on Jan 16, 2019

    @Hixie
    Contributor
  12. 2 remaining items

  13. jonahwilliams commented on Feb 22, 2019

    @jonahwilliams
    Contributor

    This is somewhat blocked by the tree status, but is also related to how Gradle and XCode use artifacts. Currently they require everything up front, which we need to change eventually to make this work.

  14. jonahwilliams commented on Apr 22, 2019

    @jonahwilliams
    Contributor

    We've made good progress on this. All new artifacts (macOS, Linux, Windows, Web, and Fuchsia) are lazy by default. There are still a few places in the tools where we end up downloading all of Android and iOS.

  15. added
    P2Important issues not at the top of the work list
    on May 29, 2020
  16. removed this from the milestone on Jun 2, 2020
  17. removed this from the milestone on Jun 2, 2020
  18. removed this from the milestone on Aug 17, 2020
  19. jonahwilliams commented on Aug 31, 2020

    @jonahwilliams
    Contributor

    For additional context from #64446 (which I am de-duping into this bug). There are some remaining cases where we eagerly download artifacts for devices that are connected but that we do not intend to use - this has mostly come up with the non-ephemeral devices.

    A reasonable fix would be to defer additional artifact downloading until after we have selected a device.

  20. xster commented on Aug 31, 2020

    @xster
    Member

    +1 I still run into this on scenarios like downloading ios-release tools when I flutter run (debug) on iOS devices etc.

  21. jonahwilliams commented on Aug 31, 2020

    @jonahwilliams
    Contributor

    That one is slightly separate, we download all of the bundles (debug/profile/release) all at once because splitting them up ended up breaking too many integration tests (at the time). it might be easier now that the build systems have been cleaned up

  22. pedromassango commented on Sep 1, 2020

    @pedromassango
    Member

    A possible related issue #64822 (Cache the SDK on switching channel).

  23. added
    tool-still-validIssues that have been deemed still valid as part of the Flutter Tools issue cleanup initiative.
    on Jun 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listc: new featureNothing broken; request for a new capabilityteam-toolOwned by Flutter Tool teamtoolAffects the "flutter" command-line tool. See also t: labels.tool-still-validIssues that have been deemed still valid as part of the Flutter Tools issue cleanup initiative.triaged-toolTriaged by Flutter Tool team

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions