Hello, I started profiling our webgl game and I notice these spikes: The "PutGeometryJobFence" call spikes every few seconds taking more than 50% of the frame. I have only one character with skinned meshes in the scene. Is there a way we can avoid this? Make it less frequent, optimize things? Thanks, Alex
That seems odd. Is it a complex character ? how much does PutGeometryJobFence cost in frames with no spike ? You could try to reduce the number of Blend Weights to 2 or 1 bones in the Quality Settings.
I analyzed a bit more, screen shot here: The first half you can see there are no spikes, Meshskinning.update takes at most 2%, the second half there are spikes, where it takes 50% The difference is this: in the first half I had my browser window on my secondary, smaller (resolution wise) monitor, in the second half it's on the primary larger monitor. Because it's a bit larger, there are 30 more drawcalls but I don't think that has anything to do with it.
Could you file a bug report with a small repro case for this (and post the case number here)? This looks like something we should investigate in depth.
I filed a bugreport, with this number: 746290 Basically it's just the character model with the animator from the game, and a small piece of the code that replicates the behaviour we have in game. The result is the same: when the animator changes states we see high spikes. Many thanks for your help!
Not unimportant: I just confirmed with the bug report project that you see these spikes *only* if the browser is on a secondary screen. So this happens on my laptop, and when I run the game on the screen of the laptop -> spikes, if it's on a secondary screen then there are no spikes (or less big). In my second test the resolution of both screens is the same and I see the same behaviour so as I expected: resolution is not important here.
Just upgraded to 5.3.0f4 today. At first glance in the editor things looked good, but once we built to devices and profiled we noticed the same issue "PutGeometryJobFence" causing a major cpu hit. It seems pretty constant during our gameplay. For us this was not a problem in 5.2.3. Here is a shot from our profiler: Our project is a 2D game, and it seems the issue appears when our character sprites are present (which is almost always).
I have filed a bug, Case 751895 regarding the PutGeometryJobFence sustained performance hit. I'll be continuing experiments today to try to identify more accurate what is causing this increase.
I received a response from Unity QA and was able to submit a reproduction project, we'll see what they say. For now I'll copy you all on my most recent message to Unity: I was able to isolate the assets that cause this new sustained performance problem for us. Maybe you can help us figure out why this occurs. I've attached 2 screenshots and a simple project extracted from our game. In the scene of the sample project I've added one of our game map backgrounds that is now performing poorly. To be clear, all of our maps were previously optimized and ran smooth in both 5.1.4 and in 5.2.3... In fact, the performance was so well optimized we wrote about it on our blog back in October: http://biobeasts.artix.com/2d-background-performance-in-unity/ Now that we've upgraded to 5.3, we see what appears to be normal looking performance when profiling from the Editor (below): However, when the exact same project is built to an Android device we see terrible performance (below): We saw this poor performance on several devices, including: Droid Maxx, Samsung S6, and Nexus 7 tablet. The simple project is attached, please keep me updated: https://drive.google.com/file/d/0BwL7QqsvL2_EaWhvd1Y1MFlDeU0/view?usp=sharing
I'm not entirely sure you should post your problem in this thread, as this is in the WebGL forum and not the Android one.
I have the same problem with the MeshRenderer and MeshSkinning.Renderer in 5.2.3f1 and 5.3.0f4 everything is fine in 5.1.3f1 5.3.0f4 screen I created a thread for this issue here http://forum.unity3d.com/threads/performance-issue-after-5-1-3.373038/