feat(ui): patch reselect to use lruMemoize only

Pending resolution of https://github.com/reduxjs/reselect/issues/635, we can patch `reselect` to use `lruMemoize` exclusively.

Pin RTK and react-redux versions too just to be safe.

This reduces the major GC events that were causing lag/stutters in the app, particularly in canvas and workflow editor.
This commit is contained in:
psychedelicious 2024-01-05 16:39:38 +11:00
parent cde9c3090f
commit b47afdc3b5
3 changed files with 258 additions and 6 deletions

View File

@ -68,7 +68,7 @@
"@fontsource-variable/inter": "^5.0.16",
"@mantine/form": "6.0.21",
"@nanostores/react": "^0.7.1",
"@reduxjs/toolkit": "^2.0.1",
"@reduxjs/toolkit": "2.0.1",
"@roarr/browser-log-writer": "^1.3.0",
"chakra-react-select": "^4.7.6",
"compare-versions": "^6.1.0",
@ -94,7 +94,7 @@
"react-i18next": "^14.0.0",
"react-icons": "^4.12.0",
"react-konva": "^18.2.10",
"react-redux": "^9.0.4",
"react-redux": "9.0.4",
"react-resizable-panels": "^1.0.7",
"react-select": "5.8.0",
"react-textarea-autosize": "^8.5.3",
@ -167,5 +167,10 @@
"vite-plugin-dts": "^3.7.0",
"vite-plugin-eslint": "^1.8.1",
"vite-tsconfig-paths": "^4.2.3"
},
"pnpm": {
"patchedDependencies": {
"reselect@5.0.1": "patches/reselect@5.0.1.patch"
}
}
}

File diff suppressed because one or more lines are too long

View File

@ -4,6 +4,11 @@ settings:
autoInstallPeers: true
excludeLinksFromLockfile: false
patchedDependencies:
reselect@5.0.1:
hash: kvbgwzjyy4x4fnh7znyocvb75q
path: patches/reselect@5.0.1.patch
dependencies:
'@chakra-ui/anatomy':
specifier: ^2.2.2
@ -54,7 +59,7 @@ dependencies:
specifier: ^0.7.1
version: 0.7.1(nanostores@0.9.5)(react@18.2.0)
'@reduxjs/toolkit':
specifier: ^2.0.1
specifier: 2.0.1
version: 2.0.1(react-redux@9.0.4)(react@18.2.0)
'@roarr/browser-log-writer':
specifier: ^1.3.0
@ -132,7 +137,7 @@ dependencies:
specifier: ^18.2.10
version: 18.2.10(konva@9.3.0)(react-dom@18.2.0)(react@18.2.0)
react-redux:
specifier: ^9.0.4
specifier: 9.0.4
version: 9.0.4(@types/react@18.2.46)(react@18.2.0)(redux@5.0.1)
react-resizable-panels:
specifier: ^1.0.7
@ -4565,7 +4570,7 @@ packages:
react-redux: 9.0.4(@types/react@18.2.46)(react@18.2.0)(redux@5.0.1)
redux: 5.0.1
redux-thunk: 3.1.0(redux@5.0.1)
reselect: 5.0.1
reselect: 5.0.1(patch_hash=kvbgwzjyy4x4fnh7znyocvb75q)
dev: false
/@roarr/browser-log-writer@1.3.0:
@ -11932,9 +11937,10 @@ packages:
hasBin: true
dev: true
/reselect@5.0.1:
/reselect@5.0.1(patch_hash=kvbgwzjyy4x4fnh7znyocvb75q):
resolution: {integrity: sha512-D72j2ubjgHpvuCiORWkOUxndHJrxDaSolheiz5CO+roz8ka97/4msh2E8F5qay4GawR5vzBt5MkbDHT+Rdy/Wg==}
dev: false
patched: true
/resize-observer-polyfill@1.5.1:
resolution: {integrity: sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg==}