-
Hello, The question is in the title, but I will give some context. I was doing performance measures on our webapp and I spotted the following issue: When fetching data from our server, the RAM used by the page increases (nothing surprising here). After some investigations, I found the cause. The previous data are kept in the We were first using v4, where revertState is a public attribute that can be cleared manually. I did it to check if the memory increase really came from here. However, it was a "dirty" fix we don't want to have in prod. I updated to v5 to see if this problem was resolved. The fact that revertState is never cleared is a problem for us as we can receive large amounts of data from a single query. Having twice these data in memory can really downgrade the performances. However, before openning an issue, I prefer asking if there is a way to solve this problem. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
I think we should re-set query/packages/query-core/src/query.ts Lines 606 to 607 in dfbda9d would you like to open a PR ? |
Beta Was this translation helpful? Give feedback.
-
Pull request opened here: #9265 |
Beta Was this translation helpful? Give feedback.
I think we should re-set
revertState
when a query finishes successfully, so here:query/packages/query-core/src/query.ts
Lines 606 to 607 in dfbda9d
would you like to open a PR ?