Commit 3da4d41
Markdown reader: more efficient base64 data URI parsing.
This patch borrows some code from @silby's PR #10434 and should
be regarded as co-authored. This is a lighter-weight patch
that only touches the Markdown reader.
The basic idea is to speed up parsing of base64 URIs by parsing
them with a special path. This should improve the problem
noted at #10075.
Benchmarks (optimized compilation):
Converting the large test.md from #10075 (7.6Mb embedded image)
from markdown to json,
before: 6182 GCs, 1578M in use, 5.471 MUT, 1.473 GC
after: 951 GCs, 80M in use, .247 MUT, 0.035 GC
For now we leave #10075 open to investigate improvements in
HTML rendering with these large data URIs.
Co-authored-by: Evan Silberman <[email protected]>1 parent ca4ad3b commit 3da4d41
1 file changed
+36
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
| |||
1834 | 1835 | | |
1835 | 1836 | | |
1836 | 1837 | | |
1837 | | - | |
| 1838 | + | |
1838 | 1839 | | |
1839 | 1840 | | |
1840 | 1841 | | |
1841 | 1842 | | |
1842 | 1843 | | |
| 1844 | + | |
| 1845 | + | |
| 1846 | + | |
| 1847 | + | |
| 1848 | + | |
| 1849 | + | |
| 1850 | + | |
| 1851 | + | |
| 1852 | + | |
| 1853 | + | |
| 1854 | + | |
| 1855 | + | |
| 1856 | + | |
| 1857 | + | |
| 1858 | + | |
| 1859 | + | |
| 1860 | + | |
| 1861 | + | |
| 1862 | + | |
| 1863 | + | |
| 1864 | + | |
| 1865 | + | |
| 1866 | + | |
| 1867 | + | |
| 1868 | + | |
| 1869 | + | |
| 1870 | + | |
| 1871 | + | |
| 1872 | + | |
| 1873 | + | |
| 1874 | + | |
| 1875 | + | |
| 1876 | + | |
| 1877 | + | |
1843 | 1878 | | |
1844 | 1879 | | |
1845 | 1880 | | |
| |||
0 commit comments