Proposal: reuse the same EffectiveViewportChangedEventArgs object #9256
Labels
area-Performance
feature proposal
New feature proposal
team-CompInput
Issue for IXP (Composition, Input) team
Currently, every time
EffectiveViewportChanged
is fired, a newEffectiveViewportChangedEventArgs
is created.While this is probably fine in C++, it causes a huge memory traffic in C# and consequently a large amount of garbage collections.
I see from the source code that quite a few events reuse the same args over and over for performance reasons (
ListView.ContainerContentChanging
to mention one), and I guess it would make sense to do it here too, asEffectiveViewportChanged
callbacks tend to be a hot path (tracking visible elements on screen in scrollable areas and such).The text was updated successfully, but these errors were encountered: