Skip to content

Hot reload "syncing files to device" takes a long time #6508

Closed

Description

@Hixie

Can we maybe compress the files or find a quicker way to send them or send them with the initial package or something?

Activity

  1. added this to the milestone on Oct 24, 2016
  2. johnmccutchan commented on Oct 27, 2016

    @johnmccutchan
    Contributor

    Re-compression: We are already using gzip compression over an HTTP put.

    We might want to try bundling an initial version of the source into the APK/IPA.

    Is this in reference to the initial copy of the files that happens before we start the application or the syncing of the remaining that happens while the app is launching? If it is the latter, I think we can make that faster by not doing it at all.

  3. Hixie commented on Oct 27, 2016

    @Hixie
    ContributorAuthor

    This is in reference to the time you see the progress meter on the device.

    But more broadly, my interest is in minimising the time from starting "flutter run" to having the device be responsive with your app loaded.

  4. johnmccutchan commented on Oct 27, 2016

    @johnmccutchan
    Contributor

    When the progress meter is on the device we do the following:

    1. Use the snapshot binary to quickly determine the minimal set of Dart sources actually loaded by your program. We don't build a snapshot but rely on the VM's parser to determine the transitive import set. This is very fast.
    2. Begin sending over the Dart sources via HTTP PUT compressed with gzip. This isn't that fast but I'm not sure what could be done to speed it up.
    3. Send over all assets via HTTP PUT compressed with gzip. This isn't that fast but I'm not sure what could be done to speed it up.
    4. Start the program
  5. Hixie commented on Oct 27, 2016

    @Hixie
    ContributorAuthor

    How much data are we sending and what's the overall average data rate?

  6. github-actions commented on Aug 15, 2021

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  7. locked as resolved and limited conversation to collaborators on Aug 15, 2021
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

    c: performanceRelates to speed or footprint issues (see "perf:" labels)t: hot reloadReloading code during "flutter run"

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions