[dart tool] dart run <dart-file>
is significantly slower than dart <dart-file>
command
#43969
Labels
area-dart-cli
Use area-dart-cli for issues related to the 'dart' command like tool.
Running
dart run <dart-file>
is much slower than runningdart <dart-file>
. This is inconsistent with the dart tool doc and the issue was raised on reddit. It appears thedart run
version is doing much more work before starting the app. See comparisons below:example/hello.dart
$ time dart run example/hello.dart hello real 0m0.630s user 0m0.432s sys 0m0.134s
$ time dart example/hello.dart hello real 0m0.190s user 0m0.188s sys 0m0.073s
$ time pub run example/hello.dart hello real 0m0.360s user 0m0.417s sys 0m0.127s
Dart SDK version: 2.11.0-240.0.dev (dev) (Tue Oct 20 16:27:23 2020 -0700) on "macos_x64"
The text was updated successfully, but these errors were encountered: