Disable gatekeeper notarisation check without disabling SIP
I am running into this issue where MacOS does security checks on new executables over the network. This introduces a significant delay when first running a new executable. It's very annoying when developing code because the executables are almost always new.
Is there any way to disable this check without disabling SIP?
Aha, I didn't find a way to disable it system-wide for all apps, but you can disable it for specific apps in System Preferences -> Security & Privacy -> Privacy -> Developer Tools
You can disable Apple Mobile File Integrity by restarting your Mac into Recovery mode (hold Cmd-R while booting), and then run the following commands in a Terminal:
csrutil disable
nvram boot-args="amfi_get_out_of_my_way=0x1"
Then reboot your Mac and the delays should be gone.