Spawn Particle at Location Performance Hiccup
I get a small but noticeable hiccup in performance when I spawn a particle system from C++. This is in essence what the spawn function looks like:
BotchedEffect is a pointer to the asset that I've set in the Editor.
I've also tried using TAssetPtr with SimpleAsyncLoad to load the asset on start and then call .Get() to get the pointer and spawn the asset but that also has a hiccup.
Details from "stat unitgraph"
The above images show the two different events. (1) is the first spawn with the hiccup (2) is the second spawn and all others after that, that do not cause a hiccup.
I feel like the issues stems from the concept that the asset isn't loaded when I try to spawn it so the engine has to load the asset into memory and spawn it.
Any thoughts on why this might be happening? Is there a proper way to spawn assets without a hiccup? Specifically particle systems, but in general all things.
asked May 12 '15 at 10:42 PM in C++ Programming
After profiling this intensely I found that the issues was just my perception of the graph. I was testing it at an unlocked framerate and thus the difference was visible. After capping it at 60fps there is almost no visible impact at all.
Sorry for the undue trouble!
answered Jul 21 '15 at 09:14 PM
You can use FindObject to see if an object is in memory or not
answered Jul 17 '15 at 12:01 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here