I believe we’re seeing a very similar issue, though I’m not 100% if it’s the exact same issue or not which is why I’m posting… We’re very antsy to jump onto 2017.2, and it’ll probably be the last upgrade we do (we’ve a shipping production game) for a while after having kept up with all major & minor releases since ~5.3 and not had any major issues.
In 2017.2 however, many of our UIs have slowed very substantially – some of them can take the game from 60-100FPS down to <30FPS.
The offending UIs, and indeed many of the UIs in our game, make use of some combination of: ContentSizeFitter + GridLayoutGroup + ScrollView
Occasionally we’ll use a different LayoutGroup variant, but generally speaking the vast majority are a combo of at least two of the above three, or all 3. We’re seeing some of these UIs, especially those with a number of children elements, have had their times jump by orders of magnitude.
I don’t want to switch over to 2017.2 this moment to get the exact profiler trace (else I end up having to rm -rf /PROJDIR/Library when switching back to 2017.1, else the editor crashes immediately upon entering Play mode; reproduces every time) but from my notes we were seeing the offending times be in OnRectTransformDimensionsChange I believe – it looked like it was basically ‘looping’, as if each component was setting a size and shipping a “DimensionsChanged” event, then… recursion, perhaps.
FWIW, after debugging it a bit I was able to gain some positive ground on the issue via adding a secondary Canvas and setting PixelPerfect=false, but really the major gains came from disabling the LayoutGroup or removing/disabling child transforms until there were just a few (ie <5 – and we aren’t pushing limits here, normally maybe 50 or so on the higher ends). I was also able to make some headway via removing the ContentSizeFitter and using custom code to set heights/widths appropriately; that’s a tough one for us to make scale right now, though, given that we have an untold number of UIs that would need manually adjusted & code written for. If no other option, that’s what we’ll do, but we’re going to try to avoid it for usre.
Note that I haven’t tried RC2 yet, though just skimmed the notes and didn’t see any indication of a fix here & based on the above post, am guessing that it didn’t get into RC2 – I’m at least hopeful that the issue we’re seeing is the same as the OP’s, and that you guys have a beat on it, but if you guys @UT think it may not be then let me know and I’ll get some project files put together.
Am really hoping it’s fixed by release, would be a bummer to have to wait to move over because of a UI render issue of all things – but that’s how gamedev goes sometimes, it seems! =D
Thanks in advance for any insight or guidance, much appreciate all that you guys do!