-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
docs: Performance Discussions #3940
Comments
Generally speaking, streams should be a good choice to work with real-time data and are probably best for performance. As bloc is using them it should be able to handle your use-case. (I dont know what GetX is using under the hood) If you face performance issues with Bloc, revisit which parts of the UI actually depend on real-time data and build up your widget tree accordingly. You can also look into (stream) transformers to try reduce the amount of events that a real-time data source adds to your bloc which also reduces the amount of rebuilds. I am not too sure how performant Dart streams are, others may have some insight to add. If they are comparable to Java streams you could also consider doing required calculations on your real-time data within the stream which "could" be more performant than doing it in the onEvent of the bloc. Then again the performance of Java streams also comes from the fact that you can get concurrent operations out-of-the-box with them. |
Hi @charlieforward9 👋 I highly recommend running your own benchmarks but generally bloc and streams should be sufficient for managing real-time updates. Closing for now since there aren't any actionable next steps. 👍 |
I am reading articles on state management performance and I get varying responses. I would like to keep using BLoC, but our business needs require real time performance, so I need to find the best approach:
Which is correct? And more broadly, how does BLoC perform overall?
While docs would be nice, I understand there are many other tasks that precede the importance of this. Github Discussions was extremely helpful when I was learning to use ViteSSRPlugin. I would appreciate discussing BLoC-specific development in a non-issue format. As the sole app developer for my project, the open-source community has been a huge help to me.
Github Discussion seems like one of the easiest ways to promote open-source collaboration in a popular library such as this.
Thank you for your consideration.
The text was updated successfully, but these errors were encountered: