Hope this may be useful for anyone stumbling on this.
In the GenerateGraph function, if AgentSize is > CurrSize, The agent shape is appended to the list of shapes that will be queried. However, in the following switch statement, there are no break statements in the case clause. This causes extra shapes to be added to the array when they are unneeded.
Adding a break after each case should fix the issue and net some perf gains.
Hope this may be useful for anyone stumbling on this.
In the GenerateGraph function, if AgentSize is > CurrSize, The agent shape is appended to the list of shapes that will be queried. However, in the following switch statement, there are no break statements in the case clause. This causes extra shapes to be added to the array when they are unneeded.
Adding a break after each case should fix the issue and net some perf gains.