-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[Bug]: ReactiveProperty very slow with many subscriber #3935
Comments
I have done a few tests and it appears that if I include Reactive.Bindings.ReactiveProperty package in the application then indeed the multiple Subscriptions take excessive time to complete, would you be able to test this in two separate projects one with ReactiveUI only and the other with the ReactiveProperty package only, from the tests I have done 3000 subscriptions with ReactiveUI takes around 900 - 1200 ms (framework dependent), this is repeatable over and over from my findings |
I created a repository with two separate projects
Performance Measurements (1000 Subscriber) Debug Mode Normal Start |
<!-- Please be sure to read the [Contribute](https://github.com/reactiveui/reactiveui#contribute) section of the README --> **What kind of change does this PR introduce?** <!-- Bug fix, feature, docs update, ... --> fix for #3935 **What is the current behavior?** <!-- You can also link to an open issue here. --> #3935 **What is the new behavior?** <!-- If this is a feature change --> ReactiveProperty updated to handle multiple subscribers **What might this PR break?** None expected, core function still retained **Please check if the PR fulfills these requirements** - [x] Tests for the changes have been added (for bug fixes / features) - [ ] Docs have been added / updated (for bug fixes / features) **Other information**:
Describe the bug 🐞
Recently we moved the ReactiveProperty from Reactive.Bindings.ReactiveProperty to ReactiveUI.ReactiveProperty.
Now we encountered massiv performance problems for the following use case.
If you subscribe a ReactiveProperty very often, the application will freeze. It is very performace intensiv.
With Reactive.Bindings.ReactiveProperty it was not a problem.
Example
Our measurements
Reactive.Bindings.ReactiveProperty: ~3ms
ReactiveUI.ReactiveProperty: ∞
Step to reproduce
Reproduction repository
https://github.com/reactiveui/ReactiveUI
Expected behavior
This should happen...
Screenshots 🖼️
No response
IDE
No response
Operating system
No response
Version
No response
Device
No response
ReactiveUI Version
No response
Additional information ℹ️
No response
The text was updated successfully, but these errors were encountered: