-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove generics from IAvaloniaObject. #7969
Conversation
For curiosity. How much does performance improve? |
I doubt that it's changed much from just this PR - there are a couple of other more impactful changes that I'm about to make, and I'll benchmark once those are done. Wanted to separate the PRs though for easier review. |
A quick preview of a few selected benchmarks after this and some other changes: master
after refactoring
So looks like we're seeing a 10-20% speedup in some benchmarks. |
Full benchmarks after the first batch of changes at #7980 |
What does the pull request do?
We have a problem with our usage of generic virtual and generic interface methods, in that they cause performance problems in the JIT. We've decided that for 11.0 we need to at least remove generic interface methods from the public API. This PR removes generic methods from the
IAvaloniaObject
interface.In order to do so, I had to throw exceptions in quite a few places if the
IAvaloniaObject
instance isn't anAvaloniaObject
. Reimplementing this interface wasn't really feasible anyway so this shouldn't cause a problem in practise (and in future we will probably want to remove this interface completely but baby steps for now).Breaking Changes
Yes :P