STOP USING THIS WRAPPER FOR CODEMIRROR.
liesahead opened this issue · 2 comments
If you don't want to track memory leak in your application, I suggest you stop using it. All subscriptions on the screenshot are not destroyed when the component is destroyed, so you get 4 leaked subscriptions on each codemirror init, which is causing the slow-down of the application after some time of using it.
This wrapper' quality is really poor, just look at the second and third screenshots with comments, those are useless. I'm not hating, but me and my team had to profile and refactor our big app and then we found that this wrapper leaks subscriptions, after we commented codemirror instances app is flying.
You are right, this is an old project, I dont use Angular anymore and dont have time to maintain it, but, if you want my tought on your comment:
Haters cry and dont give solution to fix problems on OSS projects.
Good guys help and make PR or give alternatives, here are some of them:
https://ngx-codemirror.netlify.com/
https://www.npmjs.com/package/ngx-mat-codemirror
I didn't mean to offend you, sorry if it looks like that. I was just upset, because it took a few weeks to find a leak. I agree with your words. I'm not creating my own libraries yet, because I'm a junior developer and I'm afraid I'd create a poor-written library. And my opened "issue" is just a warning, because people are massively using this library.