Hey,
For JupyterLab 4, we migrated to CM6. And our memory leak tests are showing a minor memory leak from style-mod.js
with a style sheet not being recycled.
See for example file editor test (need to expand the details) at JupyterLab Weekly Memory Leak Tests · jupyterlab/benchmarks@76daf5f · GitHub.
Each time we instantiate a new editor, the style sheets are being updated. But in the list of style sheets, there is one style sheet with zero rule that gets inserted at each call instead of being recycle like the other style sheets:
I cannot figure out where that style sheet with no rule is coming from. Would anyone have some suggestions to get to the bottom of it?
I happily propose a PR if you can point me out to the best workaround - I was thinking to skip inserting style sheet with no rules.