perf: Fix boxing in the BorderLayerRenderer#20037
perf: Fix boxing in the BorderLayerRenderer#20037dluhring wants to merge 1 commit intounoplatform:masterfrom
Conversation
|
🤖 Your WebAssembly Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-20037/index.html |
|
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-20037/index.html |
|
|
| var previousLayoutState = _currentState; | ||
|
|
||
| if (newState.Equals(previousLayoutState) && !forceUpdate) | ||
| if (newState.Equals((BorderLayerState)previousLayoutState) && !forceUpdate) |
There was a problem hiding this comment.
I don't think this changes anything. The type of previousLayoutState is already BorderLayerState so the cast is redundant here.
There was a problem hiding this comment.
This is indeed the case, looking at it again. newState is a BorderLayerState which is already explicitly type. This must have changed since the original issue was opened.
Thanks for trying this out @dluhring, I'll be closing this PR as it's not improving the situation.
There was a problem hiding this comment.
This must have changed since the original issue was opened.
The original issue didn't state that the issue is at this line. The boxing happens inside Equals (which is synthesized by the compiler).
GitHub Issue (If applicable): closes #16107
#16107
PR Type
Performance Fix
What kind of change does this PR introduce?
Bugfix
Refactoring (no functional changes, no api changes)
What is the current behavior?
Boxing was observed in the border equals function.
What is the new behavior?
We unfortunately have not been able to figure out quality assurance methods (neither developer mode in Chrome or PerfView). however, we believe this should reduce the amount of boxing that is occurring in the .Equals comparison function found in BorderLayerRenderer UpdatePlatform method.
PR Checklist
Please check if your PR fulfills the following requirements:
Screenshots Compare Test Runresults.Other information
Internal Issue (If applicable):