Check usage of godot Arrays and push_back
Using the godot arrays with the push_back method might have some performance impact, as the array could be resized. Using resize once and then the element access instead could improve performance.
Edited by Jean Patrick Mathes