Commit 251d4da
authored
perf(wasm): pre-size the arena from the source length (#519)
Both WASM entry points built their bump allocator with Allocator::new()
while the NAPI binding already pre-sizes with for_source_len, so the
WASM parse grew its arena through repeated chunk doublings on every
call. Use the same source-length policy for parseAndRender (raw source)
and transform (frontmatter-stripped content slice).1 parent c4eb2bc commit 251d4da
1 file changed
Lines changed: 5 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
171 | 171 | | |
172 | 172 | | |
173 | 173 | | |
174 | | - | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
175 | 178 | | |
176 | 179 | | |
177 | 180 | | |
| |||
212 | 215 | | |
213 | 216 | | |
214 | 217 | | |
215 | | - | |
| 218 | + | |
216 | 219 | | |
217 | 220 | | |
218 | 221 | | |
| |||
0 commit comments