3
0
mirror of https://github.com/larvit/adf-codec.git synced 2026-11-19 14:45:44 +01:00

Emit a line mixing em, strike and strong in time linear in its mark runs

This commit is contained in:
2026-10-29 23:57:32 +01:00
committed by Lillem4n
parent c34168bbc6
commit 47b990feea
8 changed files with 231 additions and 100 deletions
+3 -2
View File
@@ -58,8 +58,9 @@
as in `[a](b` repeated: 16000 of them took 25 seconds, now 80 ms.
- `adfToLosslessMarkdown` and `adfToPortableMarkdown` write faster a line of many marked texts or
inline nodes that need a carry or lose their mark, as in text `un` beside strong `-r`, repeated:
1000 of them took 10 seconds, now 150 ms. A line mixing em, strike and strong can still take time
quadratic in its length, as in text `un` beside `-r` marked em and strong, repeated.
1000 of them took 10 seconds, now 150 ms. So does a line mixing em, strike and strong: 1000
`un` beside `-r` marked em and strong took 9 seconds, now 140 ms, and 1000 `(` marked em, strike
and strong beside a mention took 18 seconds in `adfToPortableMarkdown`, now 110 ms.
- `adfToLosslessMarkdown` and `adfToPortableMarkdown` take time linear in the markdown when lists
and quotes nest deeply, and so does `losslessMarkdownToAdf`: a list nested 480 levels around
64 KB of paragraphs took 2 seconds to write, now 100 ms. A `!adf:blockquote` holding 2 MB of lines