From 4a6fbef83f9bef2d227844e5f1255c4d18fb00ea Mon Sep 17 00:00:00 2001 From: Slava Egorov Date: Thu, 22 Aug 2024 18:19:03 +0200 Subject: [PATCH] Use "run --resident" for flutter-dev. (#153905) This makes subsequent runs much faster by allowing to skip compilation to Kernel at the cost of introducing a bit of spam into the output when it starts resident compiler for the first time. Seems like a fine trade-off for dev-mode command. ```console $ time flutter-dev -h ... ________________________________________________________ Executed in 5.32 secs fish external usr time 438.69 millis 0.09 millis 438.60 millis sys time 111.91 millis 2.42 millis 109.48 millis $ time flutter-dev -h ... ________________________________________________________ Executed in 579.14 millis fish external usr time 433.87 millis 0.08 millis 433.79 millis sys time 109.27 millis 2.57 millis 106.70 millis ``` --- bin/internal/shared.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/internal/shared.sh b/bin/internal/shared.sh index 0915a327665..bc28618758d 100644 --- a/bin/internal/shared.sh +++ b/bin/internal/shared.sh @@ -257,7 +257,7 @@ function shared::execute() { flutter-dev) # FLUTTER_TOOL_ARGS aren't quoted below, because it is meant to be # considered as separate space-separated args. - exec "$DART" --packages="$FLUTTER_TOOLS_DIR/.dart_tool/package_config.json" $FLUTTER_TOOL_ARGS "$SCRIPT_PATH" "$@" + exec "$DART" run --resident --packages="$FLUTTER_TOOLS_DIR/.dart_tool/package_config.json" $FLUTTER_TOOL_ARGS "$SCRIPT_PATH" "$@" ;; flutter*) # FLUTTER_TOOL_ARGS aren't quoted below, because it is meant to be