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

Investigate caching of args for defaultSerializeQueryArgs #3153

Closed
markerikson opened this issue Feb 3, 2023 · 0 comments · Fixed by #3193
Closed

Investigate caching of args for defaultSerializeQueryArgs #3153

markerikson opened this issue Feb 3, 2023 · 0 comments · Fixed by #3193
Milestone

Comments

@markerikson
Copy link
Collaborator

Per #3147 (comment) :

We have an RTK Query where the input to the query is large enough that the serialization logic to create the cache key affects performance...
We're still getting some performance hit because it looks like RTK Query does some JSON stringification of the arguments internally even if it's not part of the cache key, but this is manageable (about 50ms of our app startup is spent on this stringification of arguments)

I wonder if we could do some basic caching of the serialization, maybe by adding a WeakMap usage to defaultSerializeQueryArgs?

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.

1 participant