Repository navigation
Sarala: a WYSIWYG Markdown editor built with SolidJS, and keeping 12,000 blocks fast #4628
solancer
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hi everyone! I'm the developer of Sarala, a free, open-source WYSIWYG Markdown editor built with SolidJS, for desktop and the browser.
Each block of the document is its own component, and it swaps between rendered HTML and live Markdown as you click into it. The part I most enjoyed was keeping long documents fast with fine-grained reactivity.
With 12,000 blocks, a memo per block subscribing to one document-wide context meant every keystroke re-ran 12,000 memos. Now a plain loop compares each block's signature and only notifies the blocks whose signature changed, through a separate signal per block. Blocks far from the viewport render placeholders, and a 20,000-line document types at about 14 ms per key.
Try it, with no account: https://web.sarala.solancer.com
I'd love feedback, especially from anyone who has pushed Solid stores this far.
All reactions