-
Notifications
You must be signed in to change notification settings - Fork 20
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
lag when writing comments on youtube - likely bad interaction with other extensions #116
Comments
@laundmo Thanks for the detailed report. The Stacktrace points here:
Which could likely be a problem due to the MutationObserver running here:
I see you already used Firefox profiler. It would likely be helpful if you uploaded that and gave the Firefox profiler link, AFAIK this is possible there. Maybe also to see the full stacktrace there? |
Asked ChatGPT for help and here is what it essentially suggested, which could help:
I guess 1. could solve it there. I just wonder that not even the Mastodon content script has this feature.
…so after this time, the issues should go away as that timeout is as far as I see, used everywhere? Can you confirm that?
|
/cc @austinhuang0131 @hueyy as you may be interested in that (i.e. previously contributed to these files…) Also BTW, aside from that we could generalize the |
solution 1. won't help as it depends on the hostname including mastodon. as always, gpt is clueless. you'd have to come up with a way to reliably detect mastodon - a way with no false negatives. even after further testing i can't find the combination of extensions and settings causing this to happen, even though i consistently happens on my main install. I'm not sure what potentially private information is contained in a firefox profiler run, so I'm unwilling to share that. as i didn't really use the extension this much, i consider the issue unreproducible. probably shouldn't event have made one without a reproduction ready. |
Yeah of course I assumed that, did not even bother to mention that obvious mistake 😆 But there are ways like detecting some CSS class or whatever, which may not change, so certainly possible in theory. And no the issue is fine for me personally, because even when having no 100% reliable reproducer it gives an indicator there is something to improve. BTW, what made you open the issue actually – you likely did not randomly jump into the profiler just for fun? Was there a visible performance impact? Also, did you maybe use some other extensions, which modify YouTube (like adding buttons) or so (SponsorBlock e.g.)? |
if we want to just not inject on non-mastodon instances then we could set the default ofc something similar needs to be done for misskey |
I'll quote the original issue text:
as in: i hit a key and seconds later the character shows up in the text
yes, that's what i was trying to figure out with getting a reproduction - and why i don't think it matters much in the end. i have a lot of YouTube extensions: from the top of my head: enhancer, unhook, channel blocker, sponsorblock, return dislikes. of course when i add them to a fresh browser profile it all works fine. |
Okay, so could also be a combination of those and this extension here as it just modifies way too much stuff (maybe triggered by keypress) and then react… causing performance issues. I guess as an edge case I agree it is quite low-priority, anyway I would like to reopen this as the proposed enhancements to the content scripts to have less impact while browsing on non-Mastodon sites are valid, of course in any case and may actually help in more cases etc. (and many users will not debug/find out the issue is related to this extension or even report it in such a well-researched way). |
Bug description
I decided to investigate some slowness on youtube using the profiler and noticed that this extension listens for element changes and uses a lot of time for that.
im very sure its a interaction with some other extension, as i wasnt able to reproduce this issue in a new profile.
Steps to reproduce
None, as i wasnt able to reproduce with a blank browser profile
Actual behavior
on youtube: while typing comments, characters take seconds to show up. very slow ui.
as you can see, this addon takes 50% of youtubes entire cpu usage when this happens.
Expected behavior
I fully expected this extension to not do anything at all when it detects a page is not a mastodon instance.
System
Operating system and version: Win 10
Browser and version: Firefox
Add-on version: Latest
Possible solution
Extension should disable itself when encontering a non-masto page, as its supposed to only do any work on mastodon instances.
The text was updated successfully, but these errors were encountered: