How to optimize collision shapes

So i have a game where im spawning 300 entities each one right now with a simple behaviour tree and 3 colision shapes(one for character, another for hitbox and other for detection) the problem is tht at 300 entities i get 7 fps or lower, while th e bwhaviour tree obviosuly decreases performance i discovered that disabling even one of the collision shapes gives a 20 fps increase even if they dont have collision mask or layer with anything, upon disabling the 3 i get 47 fps , i dont know if there is a way of optimizing this shapes because even the basic character body 2d shape eats up a lot of fps , thanks

Depending on what you’ve got setup now. You would probably see an improvement if you simplified the collision shape. I believe circle is the fastest.

Could you use different layers instead of having 3 different colliders?

its already a circle, but even just having one collision shape decreases performance,here is a video about it if u wanna see it, it seems that the issue is with collision shapes overlaps with others, as the guy who commented says, still im confused why it “collides” if they arent set in any collision layer/mask : https://www.reddit.com/r/godot/comments/1efaa1p/comment/lflpfij/

Can you make and share a bare minimum example project?

OK, so it sounds like you know what the issue is then. Rather than the collision shapes, it’s the number of collisions. Cutting the number of collision shapes would be one way to help this. If you need all 3 per enemy, maybe you could use something like a zone system and only enable those close to the player? It might be worth looking at some of the project physics settings too, I’d start with physics/common/max_physics_steps_per_frame