-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
area-vmUse area-vm for VM related issues, including code coverage, and the AOT and JIT backends.Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends.
Description
Dart VM startup time is considerably slower when the executable is not directly in the path, but when it is instead linked symbolically (as is the case with Homebrew installations, for example). Example:
$ unzip -q dartsdk-macos-x64-release.zip
$ ln -s dart-sdk/bin/dart .
$ ./dart --version
Dart VM version: 2.1.0 (Tue Nov 13 18:22:02 2018 +0100) on "macos_x64"
$ cat >test.dart
void main() {}
$ time ./dart test.dart
./dart test.dart 0.82s user 0.11s system 148% cpu 0.626 total
$ time ./dart-sdk/bin/dart test.dart
./dart-sdk/bin/dart test.dart 0.31s user 0.08s system 178% cpu 0.219 total
$ time ./dart test.dart
./dart test.dart 0.82s user 0.10s system 148% cpu 0.626 total
$ time ./dart-sdk/bin/dart test.dart
./dart-sdk/bin/dart test.dart 0.32s user 0.07s system 177% cpu 0.221 total
Observed with Dart 2.1.0 on macOS, but it also happens on Linux and also with Dart 2.0.0. A workaround is to use a link to a shell script that exec's dart with its real path. It does not seem to matter whether the symbolic link is a relative or an absolute path.
Metadata
Metadata
Assignees
Labels
area-vmUse area-vm for VM related issues, including code coverage, and the AOT and JIT backends.Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends.