-
-
Notifications
You must be signed in to change notification settings - Fork 8.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
perf(reactivity): refactor effects #9480
Conversation
I don't think this is a performance improvement, you not running 2 loops but you creating a new array, push to it and then looping it, not sure how this will affect the performance, I'd recommend benchmarking to prove there's actually performance benefits here. |
Its execution will definitely be faster than before, because the previous logic is to traverse the entire data again, and each time it has to judge effect.computed, and an array is added so that the data that has been filtered in the first loop can be directly Loop execution, the amount of data you have the second time will be less, and no conditional judgment is needed anymore. |
Thank you for the link, based on that you can optimise it even further see perf |
Quite good, but you need to ensure that it is consistent with the original logic, and you need to execute the effect.computed effect first. |
The title for this PR seems to be off. It doesn't seem to be related to |
Do you have any better suggestions? Because compared to the previous logic, it does skip the second loop of the entire effects elements that need to be judged not to be effect.computed. |
Please update your PR title. Seems this PR is not related to |
Size ReportBundles
Usages
|
No description provided.