- Home /
How to investigate spikes in total object count and meshes observed in the profiler?
I'm seeing gfx.waitforpresent spikes in the profiler, every couple of seconds or so. I'm sure it's a mistake on my part generating a ton of objects somewhere and then gradually destroying them before the next spike, where they're created again. How can I investigate this to pin down where the objects are coming from?
See the image below. When gfx.waitforpresent spikes up, that frame has double the meshes from the previous frame, and 100 more total game objects versus the previous frame as well. Can I somehow use the profiler or other tools to profile what objects or meshes exist in a selected game frame? I want to dig deeper but I'm unsure how to proceed.
Your answer
![](https://koobas.hobune.stream/wayback/20220612144529im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Profiler.BeginSample() performance - does it affect it while not profiling? 1 Answer
editor script memory leak 1 Answer
Process uses too much CPU on Android. (PostLateUpdate.FinishFrameRendering) 0 Answers
A lot of time taken by AttributeHelperEngine.GetDefaultExecutionOrderFor() at Android app startup 0 Answers
Performance spikes 1 Answer