scene optimisation

Lets say I build a bunch of 3d objects and scatter them around the world space.
I was wondering if it’s possible to turn them on when the cameras close to them and turn them off when the cameras far away.

Ideally I’d like to build a digital landscape that you can move around with the arrow keys, and with all the objects animations going off at the same time it makes my scene really heavy. So I had a thought that I might be able to optimise this by hiding things when I’m further away from them and turning them on when I’m closer to them.

Does this sound feasible? Would I then be able to make complex arrangements that people can move around without it slowing down so much?

Any advice, help welcome.
Thanks

To hide objects beyond a certain distance, you could add a camera (such as Make Targeted Perspective Camera) and adjust its Distance Min and Max ports. See example compositions Compare Cameras and Switch Cameras.

There are a number of reasons why a composition that animates a lot of 3D objects might be slowing down, so if the camera doesn’t solve the problem, it would help if you could post your composition (or a simplified version of it).