updateSettingsPanelPosition is calling the engine on every tick even when is doing nothing. Fix it to make an early return when is doing nothing.
In my case the profiling gives an idle gui tick of 3.5 msec/frame and 0.9 msec/frame with fix.
Differential D1693
Avoid unnecessary updates from updateSettingsPanelPosition nani on Dec 12 2018, 1:08 AM. Authored by
Details updateSettingsPanelPosition is calling the engine on every tick even when is doing nothing. Fix it to make an early return when is doing nothing. In my case the profiling gives an idle gui tick of 3.5 msec/frame and 0.9 msec/frame with fix. Test that still works as intended and when the window resizes.
Diff Detail
Event TimelineComment Actions The same thing may also be the case in the ingame thing which slides down.
Comment Actions
Apparently, not. function updateMenuPosition(dt) { let menu = Engine.GetGUIObjectByName("menu"); let maxOffset = g_IsMenuOpen ? END_MENU_POSITION - menu.size.bottom : menu.size.top - MENU_TOP; if (maxOffset <= 0) return; let offset = Math.min(MENU_SPEED * dt, maxOffset) * (g_IsMenuOpen ? +1 : -1); let size = menu.size; size.top += offset; size.bottom += offset; menu.size = size; }
Comment Actions And here the guy to blame :S, can't even put off the blame by saying it was copied from the main-menu or ingame menu... offset always a number indeed. For me !offset suffices Gui tick went down from 1.7ms to 0.4ms here, so absolutely worth changing this Change trivial => accept Comment Actions While committing thought of the programming.json: @nani please put your nick and if you want name in there and upload in a new patch on the revision so you are credited Comment Actions
So the error is addressed in one of three places? |