News for hackers. Stuff that matters.
Re:MacOS Catalina: Slow by Design? by oefrha on Friday May 22, 2020 @12:04PM (#23273530)
I mean, when I’m developing in a compiled language with the workflow edit code -> compile -> run (with forced stapling), changing it to edit code -> compile -> staple -> run doesn’t make it any less slow...
Re:MacOS Catalina: Slow by Design? by oefrha on Friday May 22, 2020 @01:49PM (#23274903)
An update: flat out denying network access to syspolicyd using Little Snitch could cut down on the delay. (Yes, syspolicyd does send a network request to apple-cloudkit.com for every single new executable. Denying its access to apple-cloudkit.com only isn't sufficient either since it falls back to IP address directly.) Note that this might not be a great idea, and it still has nonzero cost — a network request has to be made and denied by Little Snitch.

Here's my benchmarking script:

  #!/bin/zsh
  tmpfile=$(mktemp)
  cat >$tmpfile <<EOF
  #!/bin/sh
  echo $RANDOM  # Use a different script each time in case it makes a difference.
  EOF
  chmod +x $tmpfile
  setopt xtrace
  time ( $tmpfile )
  time ( $tmpfile )
  unsetopt xtrace
  rm -f $tmpfile
If your local terminal emulator is immune with "Developer Tools" access (interestingly, toggling it off doesn't bring back the delay for some reason), you should be able to reproduce the delay over ssh.
Re:MacOS Catalina: Slow by Design? by davidvartan on Friday May 22, 2020 @02:05PM (#23275076)
I can repro this locally as well. Interesting if it's inconsistent with Apple docs and when Gatekeeper should be firing, as running stuff locally without distributing/downloading is somewhat out of scope for notarization.

Reached out about this to Apple dev support, hope to get more insight.

Re:MacOS Catalina: Slow by Design? by abathur on Sunday May 24, 2020 @10:29AM (#23291756)
> interestingly, toggling it off doesn't bring back the delay for some reason

Noticed the same; it should come back if you disable it and reboot.

Re:MacOS Catalina: Slow by Design? by davidvartan on Friday May 22, 2020 @12:07PM (#23273583)
Notarization/stapling/etc. is for distribution only, not generally part of your dev workflow.
Re:MacOS Catalina: Slow by Design? by oefrha on Friday May 22, 2020 @12:10PM (#23273609)
But TFA and my personal experience do point to a noticeable delay after each recompile in dev workflows, and TFA claims this is due to notarization checks... So I guess I’m confused and you’re talking about something else?
Re:MacOS Catalina: Slow by Design? by rgrs on Friday May 22, 2020 @12:27PM (#23273823)
How does mac identify a dev workflow and normal workflow?
Re:MacOS Catalina: Slow by Design? by jmercouris on Friday May 22, 2020 @12:32PM (#23273888)
When you use XCode you have different compilation options.