fixed memory leak and high cpu pike

This commit is contained in:
Ren Amamiya
2023-03-27 20:28:26 +07:00
parent eb440eda1b
commit 38033fcd57
24 changed files with 168 additions and 361 deletions

44
pnpm-lock.yaml generated
View File

@@ -17,7 +17,7 @@ specifiers:
'@tauri-apps/api': ^1.2.0
'@tauri-apps/cli': ^1.2.3
'@trivago/prettier-plugin-sort-imports': ^4.1.1
'@types/node': ^18.15.9
'@types/node': ^18.15.10
'@types/react': ^18.0.29
'@types/react-dom': ^18.0.11
'@typescript-eslint/eslint-plugin': ^5.56.0
@@ -42,7 +42,7 @@ specifiers:
next: ^13.2.4
next-remove-imports: ^1.0.10
nostr-relaypool: ^0.5.18
nostr-tools: ^1.7.5
nostr-tools: ^1.8.0
postcss: ^8.4.21
prettier: ^2.8.7
prettier-plugin-tailwindcss: ^0.2.5
@@ -83,7 +83,7 @@ dependencies:
next: 13.2.4_biqbaboplfbrettd7655fr4n2y
next-remove-imports: 1.0.10
nostr-relaypool: 0.5.18_ws@8.13.0
nostr-tools: 1.7.5
nostr-tools: 1.8.0
react: 18.2.0
react-dom: 18.2.0_react@18.2.0
react-hook-form: 7.43.8_react@18.2.0
@@ -97,7 +97,7 @@ devDependencies:
'@tailwindcss/typography': 0.5.9_tailwindcss@3.2.7
'@tauri-apps/cli': 1.2.3
'@trivago/prettier-plugin-sort-imports': 4.1.1_prettier@2.8.7
'@types/node': 18.15.9
'@types/node': 18.15.10
'@types/react': 18.0.29
'@types/react-dom': 18.0.11
'@typescript-eslint/eslint-plugin': 5.56.0_iskin7c6dxqunwflhstekcjqmq
@@ -1490,9 +1490,9 @@ packages:
{ integrity: sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ== }
dev: true
/@types/node/18.15.9:
/@types/node/18.15.10:
resolution:
{ integrity: sha512-dUxhiNzBLr6IqlZXz6e/rN2YQXlFgOei/Dxy+e3cyXTJ4txSUbGT2/fmnD6zd/75jDMeW5bDee+YXxlFKHoV0A== }
{ integrity: sha512-9avDaQJczATcXgfmMAW3MIWArOO7A+m90vuCFLr8AotWf8igO/mRoYukrk2cqZVtv38tHs33retzHEilM7FpeQ== }
/@types/phoenix/1.5.5:
resolution:
@@ -1531,7 +1531,7 @@ packages:
resolution:
{ integrity: sha512-NbsqiNX9CnEfC1Z0Vf4mE1SgAJ07JnRYcNex7AJ9zAVzmiGHmjKFEk7O4TJIsgv2B1sLEb6owKFZrACwdYngsQ== }
dependencies:
'@types/node': 18.15.9
'@types/node': 18.15.10
dev: false
/@typescript-eslint/eslint-plugin/5.56.0_iskin7c6dxqunwflhstekcjqmq:
@@ -1913,7 +1913,7 @@ packages:
postcss: ^8.1.0
dependencies:
browserslist: 4.21.5
caniuse-lite: 1.0.30001469
caniuse-lite: 1.0.30001470
fraction.js: 4.2.0
normalize-range: 0.1.2
picocolors: 1.0.0
@@ -2000,7 +2000,7 @@ packages:
engines: { node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7 }
hasBin: true
dependencies:
caniuse-lite: 1.0.30001469
caniuse-lite: 1.0.30001470
electron-to-chromium: 1.4.340
node-releases: 2.0.10
update-browserslist-db: 1.0.10_browserslist@4.21.5
@@ -2033,9 +2033,9 @@ packages:
engines: { node: '>= 6' }
dev: true
/caniuse-lite/1.0.30001469:
/caniuse-lite/1.0.30001470:
resolution:
{ integrity: sha512-Rcp7221ScNqQPP3W+lVOYDyjdR6dC+neEQCttoNr5bAyz54AboB4iwpnWgyi8P4YUsPybVzT4LgWiBbI3drL4g== }
{ integrity: sha512-065uNwY6QtHCBOExzbV6m236DDhYCCtPmQUCoQtwkVqzud8v5QPidoMr6CoMkC2nfp6nksjttqWQRRh75LqUmA== }
/chalk/2.4.2:
resolution:
@@ -2575,7 +2575,7 @@ packages:
enhanced-resolve: 5.12.0
eslint: 8.36.0
eslint-plugin-import: 2.27.5_as6wyplljmmarlclp2tx3tj6rq
get-tsconfig: 4.4.0
get-tsconfig: 4.5.0
globby: 13.1.3
is-core-module: 2.11.0
is-glob: 4.0.3
@@ -3039,9 +3039,9 @@ packages:
get-intrinsic: 1.2.0
dev: true
/get-tsconfig/4.4.0:
/get-tsconfig/4.5.0:
resolution:
{ integrity: sha512-0Gdjo/9+FzsYhXCEFueo2aY1z1tpXrxWZzP7k8ul9qt1U5o8rYJwTJYmaeHdrVosYIVYkOy2iwCJ9FdpocJhPQ== }
{ integrity: sha512-MjhiaIWCJ1sAU4pIQ5i5OfOuHHxVo1oYeNsWTON7jxYkod8pHocXeh+SSbmu5OZZZK73B6cbJ2XADzXehLyovQ== }
dev: true
/glob-parent/5.1.2:
@@ -3827,9 +3827,9 @@ packages:
{ integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== }
dev: true
/nanoid/3.3.4:
/nanoid/3.3.6:
resolution:
{ integrity: sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw== }
{ integrity: sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA== }
engines: { node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1 }
hasBin: true
@@ -3884,7 +3884,7 @@ packages:
dependencies:
'@next/env': 13.2.4
'@swc/helpers': 0.4.14
caniuse-lite: 1.0.30001469
caniuse-lite: 1.0.30001470
postcss: 8.4.14
react: 18.2.0
react-dom: 18.2.0_react@18.2.0
@@ -3949,15 +3949,15 @@ packages:
dependencies:
'@jest/source-map': 29.4.3
isomorphic-ws: 5.0.0_ws@8.13.0
nostr-tools: 1.7.5
nostr-tools: 1.8.0
safe-stable-stringify: 2.4.3
transitivePeerDependencies:
- ws
dev: false
/nostr-tools/1.7.5:
/nostr-tools/1.8.0:
resolution:
{ integrity: sha512-FFaYOAn9lFyISClbBzPe2eQ2ZiKx8xFviwHmdgTAmuue+eLrtPEI3tCqPtP624HghX/X4VnaixoiMvDB8g2+tQ== }
{ integrity: sha512-oVLAU0gukNWf57wgjK581XiVOM5hL/Y9OTDyIBpH/f54OdAB4QHinhmj1dDcZ0Eppfna3Hlmwur1FSHdsfE9ag== }
dependencies:
'@noble/hashes': 1.0.0
'@noble/secp256k1': 1.7.1
@@ -4301,7 +4301,7 @@ packages:
{ integrity: sha512-E398TUmfAYFPBSdzgeieK2Y1+1cpdxJx8yXbK/m57nRhKSmk1GB2tO4lbLBtlkfPQTDKfe4Xqv1ASWPpayPEig== }
engines: { node: ^10 || ^12 || >=14 }
dependencies:
nanoid: 3.3.4
nanoid: 3.3.6
picocolors: 1.0.0
source-map-js: 1.0.2
dev: false
@@ -4311,7 +4311,7 @@ packages:
{ integrity: sha512-tP7u/Sn/dVxK2NnruI4H9BG+x+Wxz6oeZ1cJ8P6G/PZY0IKk4k/63TDsQf2kQq3+qoJeLm2kIBUNlZe3zgb4Zg== }
engines: { node: ^10 || ^12 || >=14 }
dependencies:
nanoid: 3.3.4
nanoid: 3.3.6
picocolors: 1.0.0
source-map-js: 1.0.2
dev: true