Terrible Youtube lag (Opera 12.16)
-
donnymaan89 last edited by
Cheers gentlemen.
This youtube freeze thing got so irritating I started to look into why the new version of Opera I had used at work had turned into just like every other browser that doesn't have vertical tab stacking (apart from having it as an ugly tumor like extension designed by a programmer).
I wasn't happy to find out about what has become of my beloved browser that I had used for 10 years now.
Needless to say, when they add the next button (great for browsing pages with multiple pictures) and vertical tab stacking they can have me bite the bullet and downgrade to chrOpera. My job involves in me having multiple browsers and one opera where I keep my tons of tabs for multitasking. But until they get their chrOpera together to even half of what 12.16 is I'll roam the internet and find you smart guys who can help me patch up this old friend and keep it running nice and smoothly.Again, thank you.
-
hitanykey last edited by
Had the same problem (12.16), using the info from v1vil and davehawley I got it to work. For now. Thanks guys/gals.
-
ksandom last edited by
Hi guys,
The CSS hack above worked for me also.
#guide-subscriptions-container {display: none;}
Before finding this, I did a lot of digging with strace and made a little headway, so I'd like to add some more details that might help the Opera devs solve it on their side more cleanly.
But first some general observations.
Problem
- Any youtube page I tried would freeze for period of time.
- The freeze begins say 3-5 seconds after the video/pre-roll-ad has begun playing and lasts between 5-30 seconds.
Scope
- I've tested a few versions of opera. All have the problem.
- I have not successfully reproduced the problem in any other browser. I have tested Opera, Firefox, Chrome, Rekonq.
- I've noted both Windows and Linux users reporting this problem. I haven't seen and mac reports, but I haven't been looking for them.
- On brief inspection, Opera mini on android does not appear to have this problem, though it appears video playback may be provided by another application. The home page did not cause the problem. Note that opera mini goes to m.youtube.com which will be using a substantially cut back code base.
- Changing the useragent to IE, firefox etc does not alter the result. eg maybe browser specific javascript/css was being delivered.
My setup
- I have a large number of youtube subscriptions (163), and a long history of activity (2008).
- Low end laptop
- Opera 12.16
- 16GB RAM
- Kubuntu 12.10
- Linux 3.5.0-22-generic
- x86_64
- Intel(R) Celeron(R) CPU B820 @ 1.70GHz
- Desktop
- Opera 12.16
- 32GB RAM
- Kubuntu 13.04
- Linux 3.8.0-30-generic
- x86_64
- AMD FX(tm)-8120 Eight-Core Processor
Debug observations
- While running strace and then loading a youtube page, there are two freezes in close succession. The first one is the longest, and the second is over pretty quickly.
- When running opera on two wildly differntly spec'd machines I get very similar freeze times, however the low-end machine sometimes takes long enough for the flash plugin to crash. This suggests to me that a timeout is forming a large part of the problem, and raw processing power as a much smaller part.
- As already established, this is not a plugin causing this problem. Disabling all plugins and browsing youtube using the HTML5 player still yeilds the freeze.
- v1vil suggests that this problem is caused by new javascript on youtube. I agree, although I don't have an conclusive proof.
- Using strace I'm seeing a huge number of "Resource temporarily unavailable", which I originally thought was part of the problem since it happens on the line before the epoll_wait before the freeze, but later came to the conclusion that it was irrelevant since it happens when the browser is running fine. The full line looks like this:
"recvfrom(3, 0x333cb14, 4096, 0, 0, 0) = -1 EAGAIN (Resource temporarily unavailable)" - If I'm reading that right, the "Resource temporarily unavailable" is related to this:
open("/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 3 - In each case, the line immediately before the freeze is:
epoll_wait(8, {}, 16, 0) = 0 - If I reading it right, that relates to the following line which happens fairly early in the output: "epoll_create(20) = 8". However I haven't yet established what is actually being polled.
- Here is the epoll_create documentation: http://linux.die.net/man/2/epoll_create
- Here is the epoll_wait documentation: http://linux.die.net/man/2/epoll_wait
strace output
Producing the strace output
The strace output is huuuuge. So rather than pasting it all here, here is how I produced it:
- Closed all tabs in opera, then closed opera.
- I set my terminal (konsole) to unlimited scroll back, so I could see all output from the start.
- Ran
strace opera 2>&1 | tee /tmp/opera-debug
. That gave me output on the terminal, and saved it to /tmp/opera-debug. - Loaded the youtube home page.
- When ever there was a freeze, I'd hold enter in the terminal so I had an effective bookmark to see where it was.
- Closed opera.
The strace output around the first freeze
writev(3, [{"H\2\4\357\24\0`\4\31\0`\4\316\0)\1\r\0\246\1\0\30\2\0", 24}, {"\31\27\17\377\31\27\17\377\31\27\17\377\31\27\17\377\31\27\17\377\31\27\17\377\31\27\17\377\31\27\17\377"..., 244728}, {"", 0}], 3) = 208832 poll([{fd=3, events=POLLIN|POLLOUT}], 1, 4294967295) = 1 ([{fd=3, revents=POLLOUT}]) writev(3, [{"\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377"..., 35920}, {"", 0}], 2) = 35920 epoll_wait(8, {}, 16, 0) = 0 mmap(NULL, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f222687c000 mmap(NULL, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f2226864000 recvfrom(3, 0x333cb14, 4096, 0, 0, 0) = -1 EAGAIN (Resource temporarily unavailable) epoll_wait(8, {}, 16, 0) = 0 recvfrom(3, 0x333cb14, 4096, 0, 0, 0) = -1 EAGAIN (Resource temporarily unavailable) epoll_wait(8, {}, 16, 0) = 0 recvfrom(3, 0x333cb14, 4096, 0, 0, 0) = -1 EAGAIN (Resource temporarily unavailable) epoll_wait(8, {}, 16, 0) = 0
The freeze happens here.
recvfrom(3, "\2$\352\4\360\240{\1\355\0\0\0\t\0`\4\0\0\0\0\327\6\353\4\330\6\263\1\20\0\1\0"..., 4096, 0, NULL, NULL) = 128 recvfrom(3, 0x333cb14, 4096, 0, 0, 0) = -1 EAGAIN (Resource temporarily unavailable) poll([{fd=3, events=POLLIN|POLLOUT}], 1, 4294967295) = 1 ([{fd=3, revents=POLLOUT}]) writev(3, [{"H\0029\377\24\0`\4\31\0`\4e\1\267\0\0\0\230\0\0\30\2\0", 24}, {"\31\27\17\377\31\27\17\377\31\27\17\377\31\27\17\377\31\27\17\377\31\27\17\377\31\27\17\377\31\27\17\377"..., 261324}, {"", 0}], 3) = 208832 poll([{fd=3, events=POLLIN|POLLOUT}], 1, 4294967295) = 1 ([{fd=3, revents=POLLOUT}])
The strace output around the second freeze
write(66, "0\n1394236194\n-1\nSuper Hot Pizza "..., 4096) = 4096 write(66, "rceid=opera&ie=utf-8&oe=utf-8&ch"..., 2423) = 2423 close(66) = 0 munmap(0x7f2226892000, 4096) = 0 recvfrom(3, 0x333cb14, 4096, 0, 0, 0) = -1 EAGAIN (Resource temporarily unavailable) epoll_wait(8, {}, 16, 0) = 0
*The freeze happens here.8
recvfrom(3, 0x333cb14, 4096, 0, 0, 0) = -1 EAGAIN (Resource temporarily unavailable) poll([{fd=3, events=POLLIN|POLLOUT}], 1, 4294967295) = 1 ([{fd=3, revents=POLLOUT}]) writev(3, [{"H\2\243\373\24\0`\4\31\0`\4\357\0043\0\0\0\230\0\0\30\6\202", 24}, {"\31\27\17\377\31\27\17\377\31\27\17\377\31\27\17\377\31\27\17\377\31\27\17\377\31\27\17\377\31\27\17\377"..., 257652}, {"", 0}], 3) = 257676 poll([{fd=3, events=POLLIN|POLLOUT}], 1, 4294967295) = 1 ([{fd=3, revents=POLLOUT}]) writev(3, [{"H\2\243\373\24\0`\4\31\0`\4\357\0043\0\0\0\313\0\0\30\6\202", 24}, {"\31\27\17\377\31\27\17\377\31\27\17\377\31\27\17\377\31\27\17\377\31\27\17\377\31\27\17\377\31\27\17\377"..., 257652}, {"", 0}], 3) = 257676
I hope this is useful.
- Kevin
-
r1cky909 last edited by
Originally posted by 2slow2handle: <— This is the sidebar. I have ~200 subscriptions and opera just freezes during loading all that stuffOkay, I didn't like that list anyway :3Add this as user CSS:#guide-subscriptions-container {display: none;} Thanks. It works.Quick tutorial for newbies:1. Right-click on YouTube2. Edit site preferences...3. Display4. Create a file with path said in My style sheet5. Add this to created file#guide-subscriptions-container {display: none;}6. Save
I'm new and also having this problem and have no idea what steps 4 and 5 mean. I also don't know what to do with that
file#guide-subscriptions-container {display: none;}
Part. -
A Former User last edited by
Originally posted by r1cky909:
I'm new and also having this problem and have no idea what steps 4 and 5 mean. I also don't know what to do with that file#guide-subscriptions-container {display: none;} Part.
This is very late, but I wanted to make the steps as easy as I can for everyone, as well as myself (I had some problem understanding the solution even though I did it before).
- Open Notepad as administrator (right-click, select 'run as administrator')
- Put the following into Notepad:
#guide-subscriptions-container {display: none;}
- Save it as youtube.css and in 'Save as type', choose 'All Files'. Put it in the styles folder where Opera is installed (typically C:\Program Files\Opera\styles).
- In Youtube, right-click and select Edit site preferences. Select 'Display', go to the styles folder, and choose the youtube.css file you just created.
- Refresh, and Youtube should work.
@Kevin: Brilliant bug hunt!
-
Deleted User last edited by
@2slow2handle: Thanks for the css hack, works a treat, and everyone else with helpful comments.
Because nobody else has mentioned it, if you move your cursor over the top of the video then it'll start to freeze and stutter... so um, don't do that.
-
fefrie last edited by
Thanks for the link on the slow YT main page.
I have a css running on the page running already to eliminate ads, so I just added the recommended code.
Eliminated the subscription mess on the right, but the page still loads slow. I have a core duo computer so that might be the problem.
-
fefrie last edited by
Edit. I've got the CSS code running properly, but when I load the page, the subscriptions dont load (which is good) but the same problem persists in that the thumbnails load really slowly.
Is this the same for everyone else?
The thumbnails don't load for a bit, and then over 5-10 seconds, they 'ribbon' themselves on if that makes sense. There are rows upon rows upon rows of recommended video thumbnails. Maybe my core duo and 3gb are not enough. It certainly doesn't like scrolling, only pageup/downs.
And I just want to add, embeded videos work fine, individual youtube videos work fine,
It's just on my main page where lots and lots of thumbnails of my subscriptions/recommended videos/watch it again/trending on youtube, etc, etc page.
-
A Former User last edited by
There is a bit of a delay for me before the thumbnails populate, but it's only a second or two, and then they all populate very quickly.
Mind you, I never go in on the main page, which has loads of thumbnails, my link is https://www.youtube.com/feed/subscriptions which just brings up the latest additions from the channels I'm subscribed to.
That combined with the YouTubeCenter extension, which is set to display the thumbnails in a vertical column rather than across the page, results in it loading pretty fast.