I swear at one point, there were Unity docs advising us to ping against their Package API using delayCall. The docs currently advise to use EditorApplication.update instead, which I've done in this PR.
Looking at profiler reports, it becomes clear that the delayCall approach is especially nasty, because part of the execution logic is to append a delegate to the delayCall action. And apparently, that gets more and more expensive the more often you do it. Perhaps because in order to combine the delegates, it needs to re-capture variables or something.
But this approach in the PR attaches the delegate once, and then is responsible for clearing the delegate when the operation completes.
I swear at one point, there were Unity docs advising us to ping against their Package API using
delayCall
. The docs currently advise to useEditorApplication.update
instead, which I've done in this PR.Looking at profiler reports, it becomes clear that the
delayCall
approach is especially nasty, because part of the execution logic is to append a delegate to thedelayCall
action. And apparently, that gets more and more expensive the more often you do it. Perhaps because in order to combine the delegates, it needs to re-capture variables or something.But this approach in the PR attaches the delegate once, and then is responsible for clearing the delegate when the operation completes.