I have been having major performance issues involving Sephamore.WaitForSignal. In the profiler it is taking up 22ms of cpu time. I have seen multiple threads with no solution. I have an idea, but need confirmation on whether or not it’s related. In quite a few of my scripts I have coroutines with "yield return new WaitForSeconds() written in them. Is there any chance that this could be related to the Sephamore.WaitForSignal? My performance was relatively fine a few days ago, this issue just came into existence. Thanks!
The two have nothing to do with each other; in fact ‘WaitForSeconds’ is a yield that actually achieves the opposite effect - it stops code from executing without blocking the main thread. That semaphore means that the CPU is stalling on the GPU, waiting for it to complete some kind of rendering command. I would enable GPU profiling and go from there to see what is taking up the frame time.
yield return new WaitForSeconds() has nothing to do sephamore.WaitForSignal, 100%.
yield instructions are for enumerators while semaphores are part of multi-threading infrastructure.
_ WaitForRenderThread means that your main app thread (it’s top one in timeline view and is even labeled “Main Thread”) is waiting for “Render Thread” to complete it’s work.
In other words: your CPU is busy with rendering-related work there and can’t draw a frame until it’s done.
_