Skip to content

v1.18.2 — A full feed that costs a screenful

Choose a tag to compare

@JRBlaze JRBlaze released this 04 Sep 02:58
· 58 commits to main since this release
87af7b0

A performance fix for anyone watching a busy channel with both chats joined.

What was wrong

On a channel like xQc's, with Kick and Twitch merged into one feed, the whole machine would
become unusable the moment the counter at the foot of the panel reached 400 messages — the mouse
barely moving, the page's video freezing, the chat stalling and starting in cycles, and Task
Manager taking minutes to open. A refresh fixed it right up until it hit 400 again.

400 is not a threshold where something breaks. 400 is the number of messages the feed keeps, so
it is the point where the feed stops growing — which is to say the point where the cost of
holding it stops growing and settles at its worst. That is why it was the same number every time.

The feed kept all 400 rows fully live. Every one of them — including the several hundred nobody
can see — was laid out on each reflow, painted into the scroller, and holding decoded emote
images that the browser kept advancing frame by frame for the animated ones that are most of a
busy chat. Only the last screenful is ever on show; the rest were being paid for in full. Two
chats merged into one feed, on a page that is also playing video, is a few thousand live animated
images at once.

The fix

Rows scrolled out of view now cost nothing to keep. The browser skips their layout, their paint
and their images until you scroll back to them, and each row's real height is remembered while it
is away, so scrolling back lands where you expect rather than on an estimate. A full feed of
animated emotes now relayouts in 8ms where it took 29ms.

The feed's own message path had a smaller version of the same fault, and it is gone too: every
arriving message used to search the entire feed for a placeholder that has not been there since
the first message of the session, so the cost of finding nothing grew with every row kept.

Nothing about how much chat is kept has changed — it is still 400 by default, and still yours to
set under Messages kept in the feed. It simply no longer costs what it did.


Install: download FriendlyChatExtension-v1.18.2.zip below and follow
the steps in the README.