A flutter project to test performance of flutter clean with and without Swift Package Manager (SPM).
Run flutter clean --verbose or time flutter clean before and after the commit introducing SPM.
On a 2024 M3 MBP it takes about 3 seconds before vs. 270 seconds after the introduction of SPM.
In Flutter 3.44 the issue seems to be resolved, for MacOS at least, the time taken for flutter clean is back to a few seconds. Once SwiftPM migration for iOS comes along, the time for flutter clean is bad once more.