News for hackers. Stuff that matters.
Re:On the Utility of Phoenix LiveView by jclem on Saturday September 28, 2019 @11:14AM (#21100742)
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.

Re:On the Utility of Phoenix LiveView by mrdoops on Saturday September 28, 2019 @11:43AM (#21100969)
They rolled out debounce and throttle fairly recently. There's also some very compelling work on a component abstraction (runs in same Liveview process).