We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hey yall,
I think i found a memory leak in the CodeMirror Component...
You can find the PoC in the following Codesandbox:
CAREFUL: It will fill up your memory in just few minutes... I used a quite small interval as well as many CodeMirror to speed up the process...
https://codesandbox.io/s/gallant-danilo-nc8euu?file=/src/App.js
Memory usage: ~1 min later:
It seems like Firefox is more affected by this than Chrome.. Chromes memory fills up way slower...
The workaround that i use is the following: Instead of:
<CodeMirror theme={theme.colorScheme} height="500px" value={originalFilters} //defaultValue={originalFilters} placeholder={placeholder} onChange={setCurrentFilters} readOnly={readOnly} />
I use a memo:
<CodeMirrorMemo theme={theme.colorScheme} height="500px" value={originalFilters} //defaultValue={originalFilters} placeholder={placeholder} onChange={setCurrentFilters} readOnly={readOnly} /> const CodeMirrorMemo = memo(CodeMirror)
I'm not sure what else i could provide right now but feel free to request whatever else i can provide to help out. Thank you :)
The text was updated successfully, but these errors were encountered:
Might be related to codemirror/dev#1070 ?
Sorry, something went wrong.
@humpalum I can't solve this problem. If there is any optimization direction in the future, please let me know.
No branches or pull requests
Hey yall,
I think i found a memory leak in the CodeMirror Component...
You can find the PoC in the following Codesandbox:
CAREFUL: It will fill up your memory in just few minutes...
I used a quite small interval as well as many CodeMirror to speed up the process...
https://codesandbox.io/s/gallant-danilo-nc8euu?file=/src/App.js
Memory usage:
~1 min later:
It seems like Firefox is more affected by this than Chrome.. Chromes memory fills up way slower...
The workaround that i use is the following:
Instead of:
I use a memo:
I'm not sure what else i could provide right now but feel free to request whatever else i can provide to help out. Thank you :)
The text was updated successfully, but these errors were encountered: