Hi, did some profiling and testing. For the OP, its too bad the action didnt work they way you were hoping.
As for other people who come across this thread, for future reference. One agent using it on update has 88kb of garbage, which is not bad at all. Doing 58 agents (2 were resting of my 60), had 5KB of garbage, which is a little bit higher. But is causing me 0.57ms of CPU (of course different devices should be different). Great for PC, less great for mobile, but it was 60 agents on screen. Again, doing the check 10 x per second, etc would make little to no noticeable HUMAN difference to stopping distances. That would cut down on the garbage a lot.
I ran my test for quite a while. The garbage collector will take out the garbage on a regular basis, so there should be no build-up unless there is a problem somewhere else.
The garbage collection is due to 2 internal methods that unity uses to do its calculations, so there is no way to avoid it in this action. Again, I suggest using this action when it is necessary (check to see if the standard "Get Remaining Distance" is ever returning infinity. If there are more than 2 corners in a path, this is a known issue. See my screenshot for the garbage collection location.
As for its accuracy, it remains just as accurate as other methods. Again, did a little test.
The action is throwing no yellow warnings. Therefore, this action works as expected.
Again to OP, glad you got it worked out for your setup!