See https://github.com/tapjs/node-tap/issues/574
When using the specy reporter in node-tap, the performance falls off as more lines are added to the <Static> element.
It looks like <Static> is getting the newChildren list by converting the list of children to an array (a full scan) and then filtering it (another scan) by checking if it's included in the previously rendered set (another scan!) That's O(n^3) if I'm understanding the logic correctly.
It could probably keep a pointer to the next element that needs to be rendered (or even delete children once they're rendered?)
Interesting idea about the pointer, I will see what can be done!
Fixed via https://github.com/vadimdemedes/ink/commit/78be775973ac234b0ae5e2e65c662fd0297eb038, released in 2.3.0. Thanks for reporting, @isaacs!
That was fast! I'll pull your update pr and see if it solves the issue. Thanks!
Yeah, that made all of tap's ink-based reporters noticeably faster. Shipped in 14.3.1.
Most helpful comment
Fixed via https://github.com/vadimdemedes/ink/commit/78be775973ac234b0ae5e2e65c662fd0297eb038, released in
2.3.0. Thanks for reporting, @isaacs!