-
-
Notifications
You must be signed in to change notification settings - Fork 10
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
ObservableEvents significantly slows down build times #134
Comments
What IDE are you using including version number? What Target framework? New or old csproj format? Thanks |
#133 could have a impact on this one also. |
Rider 2022.2.1 |
I'm new to this library, but the intellisense took so long to load, that I thought I was doing something wrong or that it was broken. VS 2022: 17.3.0 |
#133 will help a lot with this. Roslyn 4 has a lot of optimisations. Source generators do have slowness with intellisense in general though. |
I'm working on a proprietary project which utilizes ObservableEvents for all event handling. In one of my views, I use
.Events()
22 times. These 22 times cause an additional 3 minutes of build time for the project. If I comment them out, the slowness goes away.It's hard to characterize exactly why this view slows down the build so dramatically, but it is directly correlated with the number of
.Events()
calls I have in the codebehind.I made a test app with a single view, and codebehind that has 200 copies of this line:
this.Events().PropertyChanged.Subscribe(_ => ViewModel.MyValue = "fdsa");
The view implements
INotifyPropertyChanged
.The constructor looks something like:
And building this single-view app takes 50 seconds. Without these 200 lines, it takes less than 3 seconds.
This is how I include this package in my project:
Let me know if you need more info.
The text was updated successfully, but these errors were encountered: