I am using MacOS Big Sur 11.3 on a 2019 MacBook Pro. Recently, I started noticing that some programs (specifically MATLAB) have been running really slow, the cursor and mouse are lagging, etc. Programs other than MATLAB (e.g. Safari, Music, Photos, etc.) all work fine. This happens even when MATLAB is idle (i.e. I am not running any sort of computationally-intensive simulation).
When I look at the Activity Monitor, MATLAB is consuming less than 10% CPU and <2 GB of memory. However, there are two other root processes called "spindump" and "sandboxd" which are eating up a ton of CPU. In particular, "sandboxd" is consuming >98% of CPU and is almost always at the top of CPU usage when running MATLAB (although occasionally disappears). The "spindump" process is a bit rarer but occasionally shows up eating up >40% of CPU.
Can anyone explain why this is happening so I can decide if this might be a Mac / Apple support issue or something I should take up with MATLAB?
kill $(pgrep sandboxd); kill $(pgrep spindump)