Skip to content
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

Render function called whenever a computed value's dependency is updated, though the value didn't change #7767

Closed
fnlctrl opened this issue Mar 8, 2018 · 2 comments · Fixed by #7824

Comments

@fnlctrl
Copy link
Member

fnlctrl commented Mar 8, 2018

Version

2.5.13

Reproduction link

https://jsfiddle.net/72gzmayL/

Steps to reproduce

Open the jsfiddle link, see console output.

What is expected?

Render function isn't called.

What is actually happening?

Render function is called even when nothing is changed.


This creates unnecessary render function calls, which leads to performance issues when the component is complex and render function calls aren't cheap.

@Kingwl
Copy link
Member

Kingwl commented Mar 8, 2018

#featureNotBug 😅

computed calculate is called after getter has been accessed (in render function)

@bundyo
Copy link

bundyo commented Mar 13, 2018

Ouch, I was debugging for half a day why suddenly I've got some stuttering animations lately. 😄

f2009 pushed a commit to f2009/vue that referenced this issue Jan 25, 2019
aJean pushed a commit to aJean/vue that referenced this issue Aug 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants