Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: load Twitch emotes from Helix #5239

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Nerixyz
Copy link
Contributor

@Nerixyz Nerixyz commented Mar 8, 2024

It's probably not a fix, but for a user it's a fix.

This PR refactors how Twitch emotes are loaded - using the new Helix API.

As it refactors quite a bit of stuff, it shouldn't be included in the next release.

Although the API returns decent data, it's slow. For my user (two subscriptions), I need to make 28 requests to get all emotes for one channel. One request takes about 100-250ms. Now imagine how long this would take if a user has 50 (or 100) channels open and more subscriptions. I don't think it's my implementation (this would generate a report though the slow HTTP handler alerts).

Related twitchdev issues:


@Nerixyz Nerixyz marked this pull request as draft March 8, 2024 19:37
@Felanbird
Copy link
Collaborator

Felanbird commented Mar 8, 2024

With this approach we're going to need to use owner_id over emote_set_id, at least for a specific list of channel IDs, otherwise the global tab is going to be even worse than before.

image

image

@Felanbird
Copy link
Collaborator

Felanbird commented Mar 19, 2024

notes:

a cavalcade of funni errors

image

f5-ing a single channel will label the `Twitch` section of global emotes incorrectly:

loaded naturally
image
f5 #󠀀1
image
f5 #󠀀2
image

emote menu can populate gif emotes twice in some channels (maybe specifically an issue with perma subs)

image

this does not effect the : menu
image

@Nerixyz
Copy link
Contributor Author

Nerixyz commented Mar 19, 2024

a cavalcade of funni errors

I'm hoping for Twitch to utilize the pages better. But we'll still need some rate-limiting.

f5-ing a single channel will label the Twitch section of global emotes incorrectly:

Fixed by grouping everything to Twitch (no owner-id).

emote menu can populate gif emotes twice in some channels (maybe specifically an issue with perma subs)

Seems to be twitchdev/issues#922 - I'm hoping this gets fixed - having yet another map to detect duplicates seems pointless. Btw, it's only in the popup.

@pajlada
Copy link
Member

pajlada commented Apr 1, 2024

#5289 - should make sure the emotes listed as well ordered

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants