jdx / mise

dev tools, env vars, task runner
https://mise.jdx.dev
MIT License
9.08k stars 247 forks source link

run tasks very slowly #1591

Closed sirenkovladd closed 7 months ago

sirenkovladd commented 7 months ago
dev on  master [$!?] via  v20.11.0 on ☁️  (us-west-2) 
❯ cat .mise.toml
[tasks.test]
run = "echo 123"

dev on  master [$!?] via  v20.11.0 on ☁️  (us-west-2) 
❯ time /Users/vlad/.local/bin/mise -v run test
[DEBUG] ARGS: /Users/vlad/.local/bin/mise -v run test
[DEBUG] Config {
    Config Files: [
        "~/node/binerals/dev/.mise.toml",
        "~/node/binerals/dev/.nvmrc",
        "~/.config/mise/config.toml",
        "~/.tool-versions",
    ],
}
[DEBUG] Toolset: node@20, watchexec@1.25.1
[INFO] [test] $ echo 123
[DEBUG] $ sh -c echo 123 
[test] 123
/Users/vlad/.local/bin/mise -v run test  0.45s user 1.83s system 38% cpu 5.901 total
sirenkovladd commented 7 months ago
❯ mise --version
2024.2.2 macos-arm64 (1f11a1d 2024-02-02)
jdx commented 7 months ago

🤷‍♂️

❯ time mise -v run test
[DEBUG] ARGS: mise -v run test
[DEBUG] Config {
    Config Files: [
        "/private/var/folders/0s/l3b8b_fs7fv5wdpr4lh9bd340000gr/T/tmp.jKMWpKPEpM/.mise.toml",
        "~/.tool-versions",
        "~/.config/mise/config.toml",
    ],
}
[DEBUG] Toolset: node@21.5.0, go:github.com/DarthSim/hivemind@latest
[INFO] [test] $ echo 123
[DEBUG] $ sh -c echo 123 
123

________________________________________________________
Executed in   21.78 millis    fish           external
   usr time    4.30 millis   33.00 micros    4.27 millis
   sys time   10.31 millis  546.00 micros    9.77 millis
sirenkovladd commented 7 months ago

Well, I understood why this happens, the larger the code base, the longer it takes

Steps to reproduce

cd $(mktemp -d)
echo '[tasks.test]\nrun = "echo 1234"' > .mise.toml
git clone git@github.com:angular/angular.git --depth 1
cd angular
yarn
cd ..

time mise -v run test

after that, the task is completed for me in about a second