Hacker News new | past | comments | ask | show | jobs | submit login

If you have a tab in the background that has flash elements (i.e. most sites with animated ads these days) they will continue to run, even if the tab is hidden. This will have a knock on performance hit.



I really think that there should be a way to shut down "smart" content that´s invisible as not to steal CPU cycles from other tasks. I don´t think Flash content is that much important you need to run it all the time.


This is already done in Safari (and probably other browsers): http://webkit.org/blog/96/background-music/

In both Safari 2 and WebKit nightlies, GIFs don’t animate unless they are being painted somewhere. If an animated GIF becomes invisible, then the animation will pause and no CPU will be consumed by the animation. Therefore all animated images in a background tab will not animate until the page in that tab becomes visible. If an animated GIF is scrolled offscreen even on a foreground page, it will stop animating until it becomes visible again.

Many plugins do animation and work based off being pumped “null events” in which they do processing. The faster you pump these events, the faster animations will occur, and the more CPU will be used. Safari 2 actually throttles these events aggressively to background windows and background tabs.


I run a music site, and I hate that safari does exactly that. I have to bring the tab to focus if I want it to move to the next song correctly. You'll notice the same behavior on Pandora.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: