Extremely Slow When Having over 1000 Objects in the Level

When I simulate the level with over a thousand objects in it, the editor runs extremely slow, and I checked that I have enabled the right graphics card. Is there a cause to this? And is it still gonna be like this after I have my game packaged?

What do those objects do? Are they just meshes or blueprints with some functionality?

Try launching a Standalone game instead in the editor. See what changes.

Do these BPs have anything peformed on ticks or timers with lots of iterations per second? Or maybe timelines or delays?

I once tried spawning about 40-50 BPs that should have rotated depending on their movement vector, with that rotation executed on ticks. That didn’t end well. I had to drop the alignment functionality and disable ticks entirely, then it worked well enough.

As for 10000 BPs… that’s quite a lot, actually. I wonder what they do.

Thank you.

Yes, these are blueprints with some functionalities. I`ve improved the blueprints a little bit and now things become really slow when the number of objects reaches 10000. And there seems to be no difference between a launched standalone game and editor version.

Yes, some of them are spawned in a loop body, and they themselves have operations that contain delays, and the delays I`ve set up should have made them do whatever they do (which is to spawn the rest of the actors that are different from themselves when it comes to it) in a single second. So could these iterations be influencing the performace? Since, you know, theoretically they should be very fast.

And just for fun`s sake, let me mention a previous issue before having this current issue. I was attempting to combine tick events with foreachloops, which gave me an infinite loop error. And after a day or so I decided not to mess around like that.

In my experience, that would influence performance a lot; even though those operations are quite fast and simple, they have to be performed for thousands of times every tick or other period of time.

Do you mean that those operations are finished within the first second of each BP life? And after that second, they do nothing?

Or do those operations continue performing throughout the entire lifetime?

In the first case, you can try totally disabling any activity of the BP once the operations are comleted. Like, disable Actor tick, Clear and Invalidate timers etc.

In the second case… well, the perspectives aren’t good, I’d say.

Either way, I’m sorry to say that, but I don’t believe you can achieve high framerates with such a high number of functioning BPs with the functionality including latent nodes and stuff.

Is it maybe possible to achieve what you’re trying to achieve otherwise? Maybe you can explain your goal a bit, and people here might give some ideas.

Well, they should be finished within the first second or at most the first few seconds, given the total count of 1000 or 10000 and the according delay, and then most of them do nothing. But the user can still interact with them and even move them at a certain speed so maybe I need to keep the ticks on. And actually I am trying to get the second case working for some certain BPs…

What I`m trying to achieve is for the users to be able to create and modify and delete a huge (hopefully arbitrary) number of those actors, there are limitations of course, the users can only change some specific properties of the actors to some certain extent. The actors for which I am trying to get the second case working are those that should be dynamic and moving randomly in a range every tick…

If these couldnt be done in blueprints smoothly, could they be done in C++? Though I havent yet learned coding games in C++.

Sorry, should have specified that the functions and interactions are indeed applied by events yes.

But still need timers to keep them moving at a certain speed when these functions are applied and until their movements are finished. So essentially the delays and timers are for visual effects, so that they move gradually toward the goal instead of teleporting. But visual effects aside, the only reasonable way I could think of to spawn really large numbers of actors is to use iterations.

And especially for those actors which move randomly in a certain range all the time, the only way I could think of is to enable ticks.

Wouldn’t it possible to implement all those interaction functions within the character blueprint and only change the actors those functions apply to when needed, and make all the internal functions based on events/interfaces called by the character?

I`ll surely try.

Thank you.

Thank you.

I haven`t learned C++ yet, but I mean to do it.

Idk then. Thousands of actors with functions performed by tick… I can’t see how that might be done without massive framerate loss. You should try to come up with some other way to do what you want.

Push em into C++. C++ is much faster than BPs and when it comes to thousands of actors with functions, there is no way doing it in blueprints without performance drop. If you don’t know C++ but have any basic experience in coding in any language, start learn it :slight_smile: There are a lot of tutorials for beginners and it looks scary from start but within few days/ weeks you will be able to make simple functions for your actors… Check comparsion between C++, nativized BPs and pure BPs:

The other MUCH simplier way is to nativize your blueprints, basically translate them into C++ code. Check documentation:

Well c++ is much faster but with the amount of Ticks running events i dont believe he will see any performance gain, I believe first: make sure that you dont have any errors, you know does “Accessed none trying to find my nose” errors not the exact error but you know what i mean, Those errors can definitely ramp up serious frame Loss really fast.

Second:, uncheck "start with Tick Enabled in your blueprint defaults and use “Timers” Setting the interval anywhere from “0.011 to 0.023” (Anything higher will tick slower) across all of your actors, using random float or something, this way all actors arent running at the same interval. maybe even implement a function in your game mode where according to the actors distance it would set its interval, kind of like a priority system.

Third: LOD’s make use of them vigorously.

Fourth:Skeletal Meshes, use Bone LOD’s (Reduce bone count the farther away it is from player camera)

And in the as jozi341 said C++, At least the big calculating cpu intensive operations

Just a few things you can do hope it helps any! Good Luck!!

Thank you.

Your suggestions have been very helpful and I`m starting to see tremendous improvements on the performance of my project.

Glad i could be of some help, if there is anything else i can help with dont hesitate to ask, Good Luck!

Oh and soon ill be releasing a quick and easy way to LOD all of your meshes at once, with just a few clicks & 100% Plug n Play so look for it in the marketplace soon. if your interested, ok. :slight_smile:

Thank you. I`ll go look for it. Have you decided its name yet?

Not yet ill see what we come up with this week :slight_smile:

Well here’s that LOD tool i mentioned, tell me what you think, Ive put this baby thru hell and back and works amazing over 10000 meshes in a little over a minute. Fast, Easy, just click and go. UE4 Amazing Lod Maker - YouTube