Welcome to the forums @"Joshua Lester"!
If I had to guess, it is probably a performance issue. 7,000 nodes means that any functions like _process
, _physics_process
, _input
, etc. are being called 7,000 times, which can lower performance. Additionally, nodes have a certain performance cost per node even if they are just holding data, due to SceneTree functions and processing.
What you may want to look at doing is seeing if you can move processing away from individual nodes and instead process in a single point or with multiple node managers. That way, you can reduce the node count, which would probably help.
For example, if you have 7,000 nodes that handle snapping and 3D cursor projections, you may want to look at instead moving that code to a manager node (maybe named cursor_snap_manager
?) and then move all the processing code there and store the positions in an array. Then instead of having code reference the node directly, you can instead get the position from the array in the manager. If you need each position to do individual distance checking and processing, a possible solution could be breaking the world into chunks and only process nodes within an active chunk, rather than every single one.
Hopefully this helps a bit! Optimizing can be a tricky process and often requires careful investigation into what is causing roadblocks and performance issues. Another thing I would highly recommend doing is making routine backups and profile to make sure changes are increasing performance.
(Side note: I adjusted the title of the topic so it's a bit more descriptive :+1: )