Skip to content

Investigate caching of args for defaultSerializeQueryArgs #3153

@markerikson

Description

@markerikson

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions