How do I merge meshes to a mesh used by instance?

Godot Version

4.2.2 mono

Question

TL;DR

Is there anyway to merge meshes to a mesh with specified transform in RenderServer?
It will be set as the base of instance.

The problem I have

I have a performance problem with so many blocks colliding and I found that’s caused by so many RenderServer.instance_set_transform calls.
It will be called when the physics state changed to display it in correct place, but a physics body is bind to some instance. So when I collide one of them, the most of them which are stacked physics body are moved, then it called multiplied RenderServer.instance_set_transform when it was moving for a few seconds.

The reason why i wrote this

I found some solution:

  • Bind the physics body to the instance(still cant find that method)
  • Decrease the freq of calling it(cant solve it when the amount is larger)
  • Merge meshes so that there’s a call when it moves(that’s the reason)

Why i used servers instead of nodes?

Because there will be so many instances. If I used node, it will be worse than now.

Thank for your answer.