I think that many projects use wrong architecture, when it's a possibility for business code to block animations.
IMO all the "user" code must run in a dedicated thread, completely decoupled from the rendering loop. This code can publish changes to a scene tree, performing changes, starting animations, and so on, but these changes ultimately are asynchronous. You want to delete an element from a webpage, but it'll not be deleted at this JS line, it'll be deleted at the next frame, or may be after that, if rendering thread is a bit busy right now.
Animations must stay fluid and UI must react to the user input instantly. FPS must not drop.
Browser does it wrong. Android GUI API does it wrong. World of Warcraft addons do it wrong.
IMO all the "user" code must run in a dedicated thread, completely decoupled from the rendering loop. This code can publish changes to a scene tree, performing changes, starting animations, and so on, but these changes ultimately are asynchronous. You want to delete an element from a webpage, but it'll not be deleted at this JS line, it'll be deleted at the next frame, or may be after that, if rendering thread is a bit busy right now.
Animations must stay fluid and UI must react to the user input instantly. FPS must not drop.
Browser does it wrong. Android GUI API does it wrong. World of Warcraft addons do it wrong.
Random GUI apps aren’t incentivized enough and so garbage leaks through. I die a bit every time a random GUI app stutters drawing 2D boxes