Description
I might bundle this up with some Dispatcher improvements to support generic invocations at least for internal use, so it would be a bigger PR. We will see, won't be right away.
Description
The Invoke
method from ElementUtil
is causing unnecessary allocations due to the attempt to catch exceptions from another thread (if invoked on) and re-throw on the current thread. This further comes the from already allocating delegates inside ElementProxy
that use this Invoke
exclusively.
Showcase
Repro
Note: This repro is specifically crafted to highlight an issue like this.
https://github.com/h3xds1nz/UIAPerformancePitfalls