im getting huge lag spikes when testing game in editer.
here's an image of the lag spikes. I've looked around for a while now and I haven't found anything that fixes it. I Don't know exactly what information Is needed in the initial question for you guys to help, but if you tell me, all provide whatever is needed.
One this I find confusing is that it says it took 4034ms, but there wants a 4 second lag spike, just maybe like 300ms. I don't know why that would be, but I'm new to this profiler stuff. I could really use some help with this.
Answer by abrobot · May 23 at 06:53 PM
Interestingly, the problem was caused for a variety of reasons. First of which is the fact that I have a rather old CPU. That was exacerbated by the fact that the editor, and more specifically the profiler, were taking up approximately 60% of my CPU's processing power. When I created the build it was much better. However, it still lagged for another reason. I was attempting to do too many calculations/ instantiate too many game objects, in one frame. And to add to all that, I didn't have VSync on, which made my CPU max out, and it wasn't capable of handling the sudden increase in workload.
Answer by PineTreeDev · May 19 at 10:17 AM
Hi, is it only on your Editor, or do the lag spikes happen in Build as well?
Looking at the timeline in the image you sent, just seems like there is a process that is making everything else wait, can you find which one is causing that wait in the timeline?
Hi thanks for the response; I figured no one would. Interestingly, the problem was caused for a variety of reasons. First of which is the fact that I have a rather old CPU. That was exacerbated by the fact that the editor, and more specifically the profiler, were taking up approximately 60% of my CPU's processing power. When I created the build it was much better. However, it still lagged for another reason. I was attempting to do too many calculations/ instantiate too many game objects, in one frame. And to add to all that, I didn't have VSync on, which made my CPU max out, and it wasn't capable of handling the sudden increase in workload.
Your answer
Follow this Question
Related Questions
Profiler failing to connect to iPhone in 2019.4 1 Answer
Really High CPU usage On empty scenes/new projects (ApplicationTickTimer problem) profiler pics 0 Answers
Massive (>1sec) lag spikes in game, within 10 seconds of starting 1 Answer
What is editor overhead ? [2017.3] 4 Answers
Unity 5.3.3. low fps in editor, doesn't use all available proccesing power 3 Answers