Skip to content

v1.4.5

Latest

Choose a tag to compare

@hownowstephen hownowstephen released this 23 Oct 20:53
98c12bb

What's Changed

Deeply nested lists no longer multiply allocations, and ConvertNode allocates about two-thirds fewer objects on real email templates. Output is unchanged.

Performance

  • List items are assembled in place instead of being copied out and rebuilt at every nesting level, so 1 MB of text inside 200 nested lists allocates 3.8 MB instead of 580 MB, and runs in 11.5 ms instead of 54 ms (#133)
  • Link text, headings and table cells reuse the string already written instead of copying it out of the buffer. On the MJML template ConvertNode goes from 38 allocations to 21, and on a document with 200 links from 203 to 3 (#134)

Dependencies

  • github.com/k3a/html2text 1.5.1, in the benchmarks module only (#115)

Full Changelog: v1.4.4...v1.4.5