Skip to content

CMake always runs flutter assemble, which adds ~5 seconds with no work to be done #93745

@malkia

Description

@malkia

Use case

flutter build windows --release -v

Shows extra 5 seconds spend somewhere. Loading the .sln file, using the "Build Logging"
extensions, shows 5 seconds spend everytime the app is build (Ctrl+Shift+B) from Visual Studio.

This led to the discovery it's due to the _phony_ target that makes it rebuilt everytime.

Now, while hot-reload is great and one of the best selling thing about flutter, a slow initial
build time, or slow in general build time if you work from the C++ side is not great.

Removing the _phony_ target from CMakeLists.txt made the problem go away
(from 11secs -> 6secs compile), but not sure why it was put in the first place, or
whether it's safe to do so.

Proposal

Look into whether it'll be possible to shed these 5 secs (50% of the time right now, spent
on my machine to flutter build windows --release .

with_phony.txt
without_phony.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Issues that are less important to the Flutter projecta: buildBuilding flutter applications with the toolc: proposalA detailed proposal for a change to Flutterperf: speedPerformance issues related to (mostly rendering) speedplatform-windowsBuilding on or for Windows specificallyteam-windowsOwned by the Windows platform teamtoolAffects 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

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy