Open Therzok opened 2 years ago
No, this is enough.
For future self: one idea to improve the performance would be to create a specialized native method for every exported managed method from a generic class whenever that class has a closed subclass. This should probably be opt-in, since it will increase app size (maybe significantly).
Steps to Reproduce
This is used as a node for an NSOutlineView, but it's possible to reproduce by just calling the
hash
selector.Expected Behavior
The callpaths should be quick for the
sealed ClosedView
. The type has all the information needed to resolve without doing runtime checks.Actual Behavior
The methods are resolved at runtime via generic APIs.
See https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1533115/ and https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1532127
Environment
VSMac, dotnet6 xamarin-macios, 6.0.201.
cc @rolfbjarne Does this need more information?