Hi, I’d noticed for a while that this was happening, it seems like unity takes time to get settled in. Initially I thought this could be a memory/collection issue so I ran the following (as given in the docs)
var tmp = new System.Object[1024];
// make allocations in smaller blocks to avoid them to be treated in a special way, which is designed for large blocks
for (int i = 0; i < 1024; i++)
{
tmp[i] = new byte[1024];
}
// release reference
tmp = null;
I even tried:
GCSettings.LatencyMode = GCLatencyMode.LowLatency;
but it didn’t make a bit of difference. I’m on a < 2 month old install of Win8 (though I’ve seen this before on win7) machine with 8gb RAM.
On a whim I forced it to use the openGL renderer with a -force-opengl command line arg, and the problem goes away (but another one appears, see below) !
Below is a project that demonstrates this. DO NOT LOOK AT FRAMERATE as that’s not the issue, just look at how jerky the boxes fall, then wait 30 seconds and see how they’re nice and smooth. This does not happen when you force it to use OpenGL.
This happens on other projects but this is the one that I’ve found a fix for it on.
http://www.megafileupload.com/en/file/399597/Bin-rar.html
Things I have double checked: This is not a development build, my CPU is not overheating, I am not paging constantly I don’t have some other process locking things up, I have tried disabling my antivirus (windows defender) for this process to no avail.
Happy to provide the source on request to Support staff/Dev.
Another note is that when I exit a fullscreen unity app that I’ve forced to use OpenGL using alt + F4 it crashes, giving the “exe has stopped working” message.
Thanks in advance,
Az