Reuse markdown instance for preferences widget#12790
Conversation
|
Hello, thanks for the fix. Here, the idea was to reuse the markdown rendering logic from |
|
@kittaakos I'm not sure how reusable the |
All clear, thank you!
Awesome contribution |
vince-fugnitto
left a comment
There was a problem hiding this comment.
LGTM 👍
- confirmed the rendering is correct
- confirmed the memory is significantly improved
|
Wow, finding my IDE based on 1.39.0 consumes too much memory. |
What it does
Closes #12789
The current implementation creates a new instance of
markdownitfor every preference leaf node. This is quite costly in frontend memory. The change moves themarkdownitinstance to a dedicated service that is shared across all nodes in a preference model.In my tests, this reduces the memory consumption of the preference widget by ~165MB:
Before (267MB):
After (102MB):
How to test
Review checklist
Reminder for reviewers