5 ms·
You'd use an incremental parser, they're specifically designed to be efficient for small edits. The big name is `tree-sitter`, but its output is compiled so on
by pedrovhb 13d ago
You'd use an incremental parser, they're specifically designed to be efficient for small edits. The big name is `tree-sitter`, but its output is compiled so on the web it requires some wasm shenanigans. For webpages, I'm a fan of `lezer`: https://lezer.codemirror.net/docs/guide/ https://lezer.codemirror.net/docs/guide/