Here is some interface architecture tips in unreal also applicable to other dev environments.
- Try building ui as standalone. Even there is no ui elements or you delete whole ui, game still should work without any single warning or error. Try building ui event based, they bind to events when spawned, they are just listeners.
- You can have ticks however have a good reason. Like you have an indicator that gets the world position of an object and converts to screen. Quest objective icon. That is something meaningfull.
- Use invalidation boxes for not frequently updated elements. You can tell those elements to repaint when a change happens.
- Use collapsed rather than hidden where you can. Cause on collapse it takes up no space in viewport, no ticks and also layout calculations are skipped.
- Use widget pooling and stacking patterns. When you open a menu over another menu. Previous one can be stacked and brought back when you go back, reducing construct and spawn costs.
- Pay attention to widgets that are not visible to player. An icon that is offscreen doesn’t have to tick anymore.
- Use stat ui check what is causing issue and optimise most costly ones first.