4f423fa548
## `to-markdown` function performance improvement ### Small example ```html <span>test</span> ``` Before: 63 `Tag` objects created; 4,090 ops/sec ±2.77% After: 1 `Tag` object created; 151,707 ops/sec ±2.64% ### Large example ```html <div> <p>lorem <b>ipsum</b></p> <p>lorem <b>ipsum</b></p> <p>lorem <b>ipsum</b></p> <p>lorem <b>ipsum</b></p> <p>lorem <b>ipsum</b></p> <aside class="quote no-group"> <blockquote> <aside class="quote no-group"> <blockquote> <p dir="ltr">test</p> </blockquote> </aside> <p dir="ltr">test2</p> </blockquote> </aside> <div> <p><span>test</span> <span>test</span> <span>test</span></p> <p><span>test</span> <span>test</span> <span>test</span></p> <p><span>test</span> <span>test</span> <span>test</span></p> <p><span>test</span> <span>test</span> <span>test</span></p> <p><span>test</span> <span>test</span> <span>test</span></p> </div> </div> ``` Before: 2394 `Tag` objects created; 179 ops/sec ±2.35% After: 38 `Tag` objects created; 4,346 ops/sec ±2.62% ### Note discourse-spoiler-alert ~~needs~~ (needed) to be updated as it modifies to-markdown code. ### Included commits * DEV: Minor code transforms * PERF: Don't create unnecessary Tag instances * DEV: Remove a now obsolete constructor argument * DEV: Rename constant * DEV: Use built-in functions, string interpolation * DEV: De-jQuerify |
||
---|---|---|
.. | ||
assets | ||
controllers | ||
helpers | ||
jobs | ||
mailers | ||
models | ||
serializers | ||
services | ||
views |