jdx / mise

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

Mise slows my shell down when jamf protect is running #2330

Open kuzmik opened 6 days ago

kuzmik commented 6 days ago

This isn't really a bug but more of a report that jamf isn't playing well with mise.

We recently rolled the jamf protect endpoint suite out to our laptops for work, and I noticed a marked slowdown in operations in my shell (zsh). For instance, running ls in my homedir takes about 200ms to return on my work laptop, and my personal laptop (which is running the exact same dotfiles but no jamf) it was instant, as one would expect.

17:30:41 <nick@arcadia:~ 2ms $ > ls
Code  Desktop  Documents  Downloads  Library  Movies  Music  OrbStack  Pictures  Public  Temp
17:30:42 <nick@arcadia:~ 195ms $ >

Here you can see the ls command took 195ms to complete. (The PS1 data, including the runtime of the previous command is from starship, which I verified was not causing any appreciable slowness.)

On my work machine I started by disabling all zsh plugins and other integrations (such as direnv, atuin, etc), one by one, and narrowed it down to mise being the main issue. In other words, with everything disabled except for mise, the slowness continues to be an issue.

17:22:32 <nick@arcadia:~ 186ms $ > zprof
num  calls                time                       self            name
-----------------------------------------------------------------------------------
 1)    1         184.49   184.49   79.24%    184.49   184.49   79.24%  _mise_hook

We temporarily disabled jamf protect on my laptop, I reverted my dotfiles and ran ls, and it was back to instant results.

16:57:03 <nick@arcadia:~ 20ms $ > zprof
num  calls                time                       self            name
-----------------------------------------------------------------------------------
 1)    1          16.87    16.87   19.20%     16.87    16.87   19.20%  _mise_hook

Additionally, running "terraform plan" (when terraform is managed by mise) is also incredibly slow; the jamf protect daemon chews up two entire cores during the process, and it takes at least 20-30 seconds longer to even start planning when jamf is one.

Again, I don't think this is a mise problem per se and likely there is nothing to be done here, but I wanted to drop a line here in case anyone else runs into issues.