daviddeutsch / yt-sanegrid

YouTube abandoned the subscription grid view. This has made a lot of people very angry and been widely regarded as a bad move.
http://daviddeutsch.github.io/yt-sanegrid/
GNU General Public License v3.0
37 stars 10 forks source link

[Bug] High demand scripts causing extreme lag #100

Closed XsExcess closed 10 years ago

XsExcess commented 10 years ago

On reloads, I get two unresponsive scripts that Firefox flags with the continue/stop script error box. Without allowing them YTSG doesn't update and only draws from the cache, but when they are clicked to allowed through, both scripts cause the entire browser to become unresponsive for several seconds including any plug-ins running at the time (ie other youtube videos in bg tabs or the full screen flash version). These scripts also seem to be causing a large amount of videos to get stuck to the top of my grid, despite them being over 5 months since upload, varying from 4-20 videos stuck in this fashion.

Tested this on multiple Firefox versions, one on the up to date stream and the other running a few months out, both have the same issue. Has been happening for at least a month, and seems to be getting worse.

For reference, this happens on fresh open, browser reload or YTSG's reload function.

daviddeutsch commented 10 years ago

Any info on which scripts are causing this?

XsExcess commented 10 years ago

I'm unsure now as I've ticked the boxes to skip both, and the only thing my firefox is able to show between the mini-freezes is that they're google scripts (useful, huh?). If you could suggest a way to get them back or view the problems I'd be happy to help. I believe they where ajax scripts though if that helps.

g-rocket commented 10 years ago

This is probably why the page takes about 30s to 1m to load for me.

daviddeutsch commented 10 years ago

@XsExcess Nope, sorry, pretty much the only Ajax thing (if you can call it that) is where we call the YT API... What do you mean with "skip both", though?

@g-rocket Wow, that is too long for sure. Is that on a desktop or a mobile device? With roughly how many videos in the list?

XsExcess commented 10 years ago

@daviddeutsch "Don't ask me again" on the Continue/Stop Script error dialog, I'm unable to find a way to untick it (everything just avoids the issue on Google, Official or otherwise) and I'm unsure where/if it would show up in the standard Web Dev tools Firefox provides.

g-rocket commented 10 years ago

@daviddeutsch That is on a mobile device (iOS 7, Mobile Safari). I don't know exactly how many videos it was loading, but it's a lot.

g-rocket commented 10 years ago

@daviddeutsch I just counted, it's displaying 536 videos in the list. Is there any way to make it load less, decresing page load time?

XsExcess commented 10 years ago

Managed to get it to stop ignoring the scripts, both jquery being derpy by the looks of it Script: https://code.jquery.com/jquery-1.10.1.min.js:4 Script: https://code.jquery.com/jquery-1.10.1.min.js:5

daviddeutsch commented 10 years ago

I will move checking on this issue after I have upgraded everything (jQuery, Angular etc.) to the latest versions.

Thanks for the insight!

XsExcess commented 10 years ago

Thanks, hopefully it works out and best of luck :)

daviddeutsch commented 10 years ago

Another notice here: I think I've managed to speed up sanegrid a good deal in the latest version, 0.9.12. Let me know if you're still experiencing issues.

XsExcess commented 10 years ago

Seems like its not getting any script lag now on reloads, although its been missing uploads a bit, not sure if thats YT being dumb or YTSG, for example https://www.youtube.com/user/day9tv/videos Day9's Day Off - Banished only shows episode 1, 3, 5 and the channel page doesn't seem like its a YT problem going off the video views.

daviddeutsch commented 10 years ago

This might still be due to the number of new videos with each request exceeding the number of entries that a request can hold. I suspect you are subscribed to a lot of channels?

XsExcess commented 10 years ago

Yeah, quite a few. Is that a request for your subscriptions new videos, or does YTSG request from each channel you're subbed too on its own?

daviddeutsch commented 10 years ago

yeah, I only get a collection through the API, so whatever happens has to fit into those 50 videos per call. If your subscribed channels publish a total of over 50 videos between checks, there will be missing videos.

There is an option to load more than those 50, I think 100 is the ultimate total. I will add a ticket for that.

daviddeutsch commented 10 years ago

Since the original problem of this ticket was solved, I will close it. If you find anything else, just open a new one.