-
-
Notifications
You must be signed in to change notification settings - Fork 7.1k
refactor: replace computed() with toRef() #21167
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
Conversation
ea9439f to
fec8132
Compare
ikushum
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking at the number of files changed, is it safe to merge this into master directly?
|
Where is your sense of adventure? |
Just worried about a potential adventurous rollback later 😅 |
|
Should be fine, |
Computed refs that are infrequently accessed and don't do anything complex can be replaced with getter refs which saves the setup and caching overhead of computed.
time to render 1000x
<v-btn icon="$vuetify" variant="flat" />:dev: 182ms (189 180 162 176 202)
pr: 139ms (146 136 133 135 144)
Some of these changes might actually hurt performance but I'm not gonna microbenchmark every single one, overall it's a significant improvement.