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

High CPU usage by using onQueryStarted handler #3346

Closed
Marcell123 opened this issue Apr 12, 2023 · 3 comments
Closed

High CPU usage by using onQueryStarted handler #3346

Marcell123 opened this issue Apr 12, 2023 · 3 comments

Comments

@Marcell123
Copy link

Marcell123 commented Apr 12, 2023

I'm learning RTK query with Redux-toolkit. Reading this article from docs:
https://redux.js.org/tutorials/essentials/part-8-rtk-query-advanced#implementing-optimistic-updates
I wrote exactly the same blog from documentation, but got a big issue with CPU.

Even if I don't run the project, but my IDE is just open,- my CPU usage is loaded by 80-90% from the beginning. And onQueryStarted handler causes this. Because when I comment this handler out, - CPU usage immediately gets loaded by few %.

Screen Recording 2023-04-12 at 20.01.59.mov.zip

@phryneas
Copy link
Member

I'm sorry, but this just sounds like the wildest thing. I fear it might not be something we can help you with, as that problem can be anything from a specific TypeScript version to a specific version of your IDE, or just any plugin you have installed there.

If you can reproduce that with a fresh project and a plain install of VSCode without extra plugins, I would be very interested to see a reproduction of this - but I fear that without that we can't really do anything about it.

@Marcell123
Copy link
Author

Found out that this default plugin caused the issue (php storm IDE):
photo_2023-04-18_00-27-53

Even after when I turned it ON again, - everything is fine. Reloading IDE before didn't help, but this plugin does. Code works fine, no problems with CPU. Hope to never reproduce this in future=)

Thanks

@phryneas
Copy link
Member

I can only recommend you try to use VSCode instead. WebStorm doesn't use the official TypeScript Type server, but some crutch they invented themselves they claim is "faster". That might fail in so many unexpected ways we cannot support - I'm sorry.

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

No branches or pull requests

3 participants