-
Notifications
You must be signed in to change notification settings - Fork 389
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dune exec --no-build
is slow
#10503
Comments
I don't know if there's much we can do. We need to load the rules in a directory to see if the executable exists. That's probably where the overhead comes from. |
Couldn’t we have some shortcuts, such as checking the presence of the binary in _build before to load all the rules? |
It wouldn't be a valid optimization. The rules can change between runs and the stale artifact would remain. |
Which would happen with |
It would not. Re-loading the rules will clear stale artifacts. |
Expected Behavior
dune exec --no-build
ordune exec
when there's nothing to build should be almost as fast as launched the binary manuallyActual Behavior
Even with
--no-build
and a path to the binary (no need to look up for a name), dune can be 40 times slower than just launching the bin by handThe cost seems to grow higher as the binary and project gets bigger.
strace
shows A LOT of activity.Reproduction
Can't open source the specific case, but any open source project can highlight this behavior
Specifications
dune
(output ofdune --version
): 3.15ocaml
(output ofocamlc --version
): 4.14.0The text was updated successfully, but these errors were encountered: