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

Getters are re-evaluated on every access #1823

Closed
Fuzzyma opened this issue Aug 31, 2020 · 6 comments
Closed

Getters are re-evaluated on every access #1823

Fuzzyma opened this issue Aug 31, 2020 · 6 comments
Labels
bug Something isn't working

Comments

@Fuzzyma
Copy link

Fuzzyma commented Aug 31, 2020

Version

4.0.0-beta.4

Reproduction link

https://codesandbox.io/s/hopeful-sanne-kv7r2?file=/src/main.js

Steps to reproduce

Open the link and open your console to see "recomputed getter" every second

What is expected?

"recomputed getter" should print once and never again

What is actually happening?

It prints every second


In vuex 3 getters were cached. Isn't that a thing anymore?

@mcrapts
Copy link

mcrapts commented Sep 22, 2020

I am also facing this issue. After migrating to Vuex 4.0.0-beta.4 my getters get re-evaluated everytime they are accessed. This has slowed down my application a lot, as my application logic relies on the fact that getters are cached.

@kiaking kiaking added the bug Something isn't working label Oct 30, 2020
kiaking added a commit that referenced this issue Oct 30, 2020
Co-authored-by: Kia Ishii <kia.king.08@gmail.com>
@kiaking kiaking closed this as completed Oct 30, 2020
@mcrapts
Copy link

mcrapts commented Jan 13, 2021

I am still experiencing this issue. Is it really fixed?

@cuebit
Copy link
Member

cuebit commented Jan 13, 2021

This fix was reverted due to scope issues in Vue. When the issue is resolved there, this fix will be rolled back.

@kiaking should this issue be reopened and keep the bug label?

@mcrapts
Copy link

mcrapts commented Jan 13, 2021

I see, thanks! At least I'm happy to see that it is clear what the issue is.

@chuski1212
Copy link

chuski1212 commented Aug 12, 2021

@kiaking Hey! Any news about this? Vue 3.1 has officially released and I'm still experiencing this issue.

@mcrapts
Copy link

mcrapts commented Aug 12, 2021

Interested in the follow-up as well. Vue 3 is basically unusable for me with this bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants