You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implement a basic support for hard links in Dune, so that building
with `--sandbox=hardlink` works.
We don't expose the symlink and hardlink actions in the Action DSL,
so no version guards are needed.
Below are some benchmarks where I build Dune's `runtest` with different
sandbox settings.
```bash
$ time _build/default/bin/main.exe build @runtest -f
real 0m37.884s
user 2m11.915s
sys 1m27.692s
$ time _build/default/bin/main.exe build @runtest -f --sandbox=symlink
real 0m39.652s
user 2m13.690s
sys 1m28.427s
$ time _build/default/bin/main.exe build @runtest -f --sandbox=hardlink
real 0m31.362s
user 2m12.012s
sys 1m21.727s
$ time _build/default/bin/main.exe build @runtest -f --sandbox=copy
real 2m1.192s
user 3m18.269s
sys 1m47.362s
```
As expected, ` --sandbox=copy` is the slowest. Somewhat surprisingly to
me, `--sandbox=hardlink` is noticeably faster than not using sandbox at
all, and using `--sandbox=symlink`. Perhaps, in the latter two cases, we
need to fall back to copying for some rules that require sandboxing.
Signed-off-by: Andrey Mokhov <amokhov@janestreet.com>
0 commit comments