Why is catalina so slow?

I have a Catalina-based MacPro laptop with 32GB memory.
I have a Mojave MacPro(trashcan) with 64GB memory.
Both are uptodate and upgraded w.r.t. everything and in particular homebrew.

MacPro, Mojave

lust% time borg | wc
70 340 3398

real 0m0.759s
user 0m0.511s
sys 0m0.191s

MacBookPro, Catalina

sloth% time borg | wc
70 340 3398

real 0m16.511s
user 0m0.394s
sys 0m0.134s

I did an dtruss on the slow one and it is creating a lot of suspicious crap in a /tmp/ directory which I cannot access if I suspend it and try to locate.

Both are identical:

sloth% sum $(which borg)
28890 7380 /usr/local/bin/borg

lust% sum $(which borg)
28890 7380 /opt/local/bin/borg

Here are some dtruss logs: https://www.dropbox.com/sh/wjc082ngugf06f3/AADsAMrrVsd2xQ9sMQLrXgZ3a?dl=0

2 Likes

Seems this is relevant:

https://news.ycombinator.com/item?id=23273247

I point to the discussion there because some of it is pretty good.

If this slow down is caused by the executable signature looks up describe in that HN thread, try disconnecting your network and seeing if there’s a speedup.

You can also try running sudo log stream --debug --info --predicate "processImagePath contains 'syspolicyd' OR processImagePath Contains[c] 'taskgated'" in another terminal and look for errors or cloudkit calls. Those could indicate is Catalina’s slow-by-design security system is to blame.

To get around that, you need to enable the “developer tools” permissions, and then grant your terminal app (Terminal, iTerm, etc) that special permission. Once that permission is on macOS won’t do the signature checks for every unsigned binary execution if the execution chain originates from there.

@varenc
I looked for the developer tools permission and couldn’t find it. Can you please tell us where it is? Thanks!

@e40 u can find it in system preferences>Security&Privacy>DeveloperTools

Thanks. Don’t know how I missed that. I looked a couple of times.