branchrust_reboot/main/mainmenu_toggle_optimscancel
2 Commits over 0 Days - Infinitycph!
- Added a fast path for root canvas toggling, that lets us toggle the main menu root canvas without triggering a lot of stuff on every graphic
- Graphic::CacheCanvas walks up and stops at the first enabled canvas instead of doing a nasty GetComponentsInParent, saves ~560KB of GC per menu toggle
- Each main menu page now has a canvas component too
Toggling the menu:
- ~134ms → ~45ms
- GC ~600KB -> 24KB
SoftMask optims:
- Don't bother updating disabled soft masks from OnCanvasHierarchyChanged
- NearestMask cache disabled masks, so we can skip the second walk
SoftMask.OnCanvasHierarchyChanged 30ms -> 0.03ms when opening the main menu