Skip to content

Perf issues with large amounts of hyperlinks & frequent updates

Detailed steps to reproduce the problem:

  1. Open up a JS/NodeJS project with a couple hundred jest v26 unit tests
  2. Run the suite with hyperlinks on
  3. Run the suite with hyperlinks off

What happened:

I've been noticing huge slowdowns when using the latest version of Jest (nodeJS test runner), and I've been able to pin these down to v26's new use of hyperlinks in the terminal. Jest's default output looks like this:

image

A test run of 700 files will print 700 hyperlinks to the console. With hyperlinks enabled in iTerm, a full run takes on average ~140-150s, with hyperlinks disabled this is brought down to ~120-130s. By comparison, in a default Terminal (which does not support hyperlinks) a full run takes ~110s.

This seems to be slightly better (few seconds) with GPU rendering turned on but I haven't been able to test this very thoroughly yet so this is rather anecdotal. I recall having other issues in the past with GPU rendering on which is why I generally have it turned off.

I do not have a repro project yet, I do have a few samples that I have attached.

What should have happened:

Performance of hyperlink text should be in line with performance of non-hyperlink text.