JetBrains / jewel

An implementation of the IntelliJ look and feels in Compose for Desktop
Apache License 2.0
636 stars 30 forks source link

Improve CommonMark parsing speed by recomputing only the modified fragments. #333

Open obask opened 3 months ago

obask commented 3 months ago

We can diff changed blocks by running commonmark with this parameter .includeSourceSpans(IncludeSourceSpans.BLOCKS) and then finding the first and the last unchanged fragment of a string. Then run commonmark on items in between and replace these blocks in the Document's children list.

rock3r commented 3 months ago

@obask is there more work to do beyond what #337 brought in? Can we close this issue?