Understanding performance bottlenecks?

I was able to make that script thanks to a code I saw that placed collision boxes on each mesh, to make the RB collisions work.

It was terribly slow in a large map like the mine (and probably the yours too), but I was able to see how the process of reading the position of each cluster worked. I don’t have the script, but if you find it there you can see how the location and rotation of each mesh is found.