bevacqua/horsey

Freezing up on large responses (w/ workaround)

joshhendo opened this issue · 0 comments

There's an issue with the last few versions of Chrome that cause accessing the innerText of an element to take significantly longer than before (~70x in my testing). This causes problems performing highlighting on large datasets due to to this line:
https://github.com/bevacqua/horsey/blob/master/horsey.js#L392

In my case, processing a 3000 character response causes Chrome to freeze for approx. 6000ms.

This looks like it will be fixed in a future version of Chrome, so likely doesn't need a long term patch in horsey. However, if anyone is facing this issue and needs an immediate fix, a workaround is to remove innerText from the line above and rely solely on textContent.

The associated bug in Chromium is: https://bugs.chromium.org/p/chromium/issues/detail?id=935237