Skip to content

I wish I could preview and audit my release size #13189

Closed

Description

@matanlurey

Similar-ish to #6177.

Today I can use flutter build aot and du -sch build/aot:

6.4M build/aot
6.4M total

It would be nice to have a way to audit the size of my binary, for example flutter audit:

6.4M

ICU Data: x.xM
Engine: x.xM
Framework: x.x.M
Packages: x.xM

package:flutter_foo_plugin x.xKb
...

Otherwise I could easily see my binary hitting 10s of Mbs, with no practical way to reduce without commenting out code/assets, rebuilding, and trying again.

Steps to Reproduce

Basically just the default application of flutter create then:

  • flutter build aot
  • du -sch build/aot

Activity

  1. sethladd commented on Nov 27, 2017

    @sethladd
    Contributor

    Thanks for the feedback!

    Consider this another vote for an extensible task/build system. flutter_tool can't be all things to all people, instead it should be extensible by our ecosystem. I don't have a solution in mind, but I do know that a logical next step for Flutter's ecosystem is an extensible task runner of some sort. Something that would allow users to install new tasks (like audit) from pub and then run flutter audit.

    I'm always excited by opportunities to lay the groundwork for our ecosystem to flourish, and it seems like other ecosystems have flourished by extensible build/task runners.

  2. added
    toolAffects the "flutter" command-line tool. See also t: labels.
    on Nov 27, 2017
  3. sethladd commented on Nov 27, 2017

    @sethladd
    Contributor
  4. mit-mit commented on Jan 2, 2018

    @mit-mit
    Member

    Yes, some kind of extensibility model has been brought on many times. I opened #13834 to track it.

  5. mit-mit commented on Jan 2, 2018

    @mit-mit
    Member

    Punting the present issue to milestone 4; this doesn't block beta.

  6. added this to the milestone on Jan 2, 2018
  7. eseidelGoogle commented on Apr 21, 2018

    @eseidelGoogle
    Contributor
  8. added
    P2Important issues not at the top of the work list
    on May 29, 2020
  9. removed this from the milestone on Aug 17, 2020
  10. jonahwilliams commented on Sep 26, 2020

    @jonahwilliams
    Contributor

    This can now be done (as much as is possible with iOS) via the new devtools code size tooling: https://flutter.dev/docs/development/tools/devtools/app-size

  11. github-actions commented on Aug 12, 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.

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

    P2Important issues not at the top of the work listc: new featureNothing broken; request for a new capabilitytoolAffects the "flutter" command-line tool. See also t: labels.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions