Reputation: 119
so I recently released my app for android, on my phone everything works fine but on the old phone of my friend its laggy, so I used the profiler of Unity to determine the performance bottlenecks and found that something called: "PostLateUpdate.PresentafterDraw" is causing Performance spikes on the cpu. Sadly there is no description on that thread(?) and the only possible reason for this I could find on the internet is too expensive shaders, but im not really using any. Also this popping up in my startscreen, where nothing is really going on, beside that startbutton expanding and shrinking in size, and also when im actually playing the game. Can anyone tell me what other things may cause these spikes? Thanks alot in advance
Greets Björn
https://i.sstatic.net/4oVN4.png
Upvotes: 1
Views: 2068
Reputation: 952
"Present" is the GPU command to present (or swap or copy) the result of rendering to the frame buffer for display. Usually, when you see it taking a long time, that means the render thread is done issueing commands (draw calls) to the GPU, and it's just waiting for the GPU to finish rendering them.
So yes, it usually indicates a long rendering time. If your game is v-synced, what can also happen is your main thread takes longer than usual, so rendering starts late, and you miss the vsync so present has to wait for another frame. Given the timings in your capture, I doubt that this is the case here.
But really, this is not enough information to go on, you didn't even say what device you were running on (iOS, Android?), and you should try to get better profiling information from Instruments (iOS) or Traceview (Android) or similar. At the very least, show us the details of drilling down under present, or what goes on inside PlayerUpdateTime for example.
Upvotes: 1