Closed raiden-dev closed 11 months ago
@raiden-dev Thx for finding this one, can repro it as long as the typed content adds the the link while the link is hovered. This really feels like some exp runtime issue, the perf degrades really fast. Interesting sidenote - the perf resets if I re-hover the link and continue typing.
From a first glance at devtools it seems the time gets eaten in this method: https://github.com/xtermjs/xterm.js/blob/a5646a58d5df674190c9917702549d23a275a316/src/browser/Linkifier2.ts#L257-L268
but that code looks rather innocent to me. Maybe there is something off with this._linkCacheDisposables
, not sure yet.
I cannot repro it on our demo, works with all renderers as expected not showing any quadratic/exp runtime growth. This is somewhat weird, as there were no substantial code changes to the linkifier or the web-links addon almost in a year.
@Tyriar My best guess here is, that this was also solved with #4814. Gonna close the issue, as master does not exhibit the toxic growth anymore.
Yep https://github.com/xtermjs/xterm.js/issues/4814 was a pretty bad bug.
Details
"xterm": "^5.3.0
,"xterm-addon-web-links": "^0.9.0"
.Steps to reproduce
WebLinksAddon
fromxterm-addon-web-links
package.Here's the traced performance profile: Trace-20231014T084401.json