7 ms·
Thanks! It’s parsing the entire Markdown content on each key press right now, which is definitely suboptimal for a product but fine for my needs. It should ce
by jclem 7y ago
Thanks!
It’s parsing the entire Markdown content on each key press right now, which is definitely suboptimal for a product but fine for my needs.
It should certainly be possible to make this more efficient by either doing some smarter diffing of the in-progress document or using an operation-based update mechanism.
LiveView doesn’t yet have event debouncing built in, but it’s in the works, I believe, and that would help, as well.
That said, it’s currently fast enough writing a post of this length that while writing, I notice no significant lag in the live updates. By the time I stop typing and look at the preview, it’s up to date.
- mrdoops 7y agoThey rolled out debounce and throttle fairly recently. There's also some very compelling work on a component abstraction (runs in same Liveview process).