enso
enso copied to clipboard
Remove optimistic query hooks
Pull Request Description
- One of many PRs that should improve Dashboard performance.
-
useMutationStateseems to be taking quite a bit of time (224ms out of 1199ms) in this trace on Firefox: - However, I haven't really noticed any real difference, although I haven't tried too hard to find a differene
- That said, this also vastly simplifies the code in
backendHooks.ts(by removing the vast majority of the methods) - As a downside, well, we will no longer have optimistic updates - but I guess we are preferring a stale-while-revalidate approach anyway (React Query) when it doesn't degrade UX
-
Important Notes
None
Testing Instructions
- Theoretically none, as this should only make the logic more correct, if anything, because we are removing a layer of indirection.
- Otherwise, test the features that use the components present in the diff. (assets table, category switcher, user, org, members table and user groups settings pages)
Checklist
Please ensure that the following checklist has been satisfied before submitting the PR:
- [x] ~~The documentation has been updated, if necessary.~~
- [x] ~~Screenshots/screencasts have been attached, if there are any visual changes. For interactive or animated visual changes, a screencast is preferred.~~
- [x] All code follows the Scala, Java, TypeScript, and Rust style guides. In case you are using a language not listed above, follow the Rust style guide.
- [x] ~~Unit tests have been written where possible.~~
Recreated problem with 200 local projects and this actually bumped performence quite nicely. ✅
this one i will consider as not needing CR as it is basically just removing code - all refactors in files other than backendHooks.ts are just switching away from the custom hooks back to the single function