<sarcasm>Even more significantly, it was found that not turning on the MacBook Air increased its battery life by 36 hours! Using this amazing data we are able to infer that not using your computer saves battery life. The less you use it, the more you save!</sarcasm>
This is more an argument for tools like Flashblock to be built into browsers (like they are on Android) than it is an argument against Flash itself. You can argue that Flash its inefficient but it's just as true that the tasks Flash is used to do are intrinsically complex and power consuming.
"it's just as true that the tasks Flash is used to do are intrinsically complex and power consuming"
Spinning, blinking, scaled moving sprite advertisements. I don't think those are intrinsically power consuming; the GPU on most phones/laptops could handle them (blind guess) 50x more power-efficiently than flash.
You should be careful how you use the term "flashblock". For desktop web browsers, most "flashblock" tools only hide the flash objects. They do this to not break compatibility as thoroughly, but it unfortunately means that browsers running flashblock are still generally 100% compatible with flash-based security exploits. It seems reasonable to expect that such tools can hardly improve the battery life over unrestricted Flash.
I don't know if this applies to Android, but on a MacBook Air, you're best off using Adblock and/or NoScript to ensure that flash objects and advertising scripts never even get fetched over the network.
>It seems reasonable to expect that such tools can hardly improve the battery life over unrestricted Flash.
If you mean to say what you're saying, that Flashblock doesn't make a significant change from unrestricted Flash, you're dead wrong. Wireless transfer is a notable driver of power consumption, but generally it being on is the main driver, not use. CPU on the other hand draws much more under load, and Flash will put it under a lot of load.
What I'm saying is that if Flashblock can't stop a script in a "blocked" flash object from installing a trojan, then clearly Flashblock isn't effective at preventing flash objects from getting CPU time.
What you say about Flashblock being installed and active as standard is true (as is the model Chrome uses where when the browser closes it automatically closes Flash - not true for Safari and Firefox) but I think the point that the test is trying to make is that this is a drain on battery life for no benefit to the user.
This wasn't a case of the user doing a load of value add things using Flash which would be fine, it was basically adverts which the user cares about not one jot draining the battery.
It's easy in the midst of the current Apple / Adobe spat to see anything involving Apple and Flash as petty bickering but I think the scale of the impact and the nature of the activity (that is nothing the user is really actively doing) make is a story / fact worth reporting.
No surprises there. Flash on a Mac is a sick joke.
People who think Apple is just looking for excuses against Flash have never used a Mac. The only time the fans kick in on any of Macs I've owned in the past decade is when Flash is running. The only time any browser crashes it's because of Flash. Flash eats memory, CPU and anything else it can lay it's hands (okay, it leaves the disk alone) on until your Mac becomes either unusable or it has drained the battery.
Flash is the closest thing to malware on a Mac. Anybody who thinks it would have even been possible to have a usable version of Flash on an iPhone or iPad grossly underestimates the incompetence of Adobe.
I've done a lot of Flash hacking while at justin.tv and I have to say, while it has its bugs, the Flash virtual machine is an under-appreciated piece of technology. It can be incredibly fast, in the right hands.
I believe the people calling for its demise are actually calling for an end to sloppy programming by bad coders who work for ad agencies. If Flash ever actually dies, and gets replaced by "HTML5", people are going to be sorely disappointed when those very same bad coders simply start writing exactly the same sloppy code in javascript.
To a certain extent, I agree; sloppily written Flash software is a huge part of the problem.
But Adobe isn't doing itself any favours either. Once every day or two the fans on my laptop ramp up for apparently no reason -- and a quick trip into the process monitor invariably reveals that the Flash plugin process has gone rampant and is eating 100% of my CPU, long after I've left the site that was using it. It's excruciating to wait for Adobe to fix these long-standing issues, as they seem to feel no real urgency to improve the performance and stability of the plugin.
"HTML5" as a group of technologies to replace Flash will no doubt see its share of terribly written uses, but at least the Firefox, Chrome, Safari et al teams can compete to write the most-efficient, least buggy runtimes for those crappy sites to run on.
You're vastly underestimating the ability of a poor programmer to bring your computer to its knees ;) A tight infinite loop running on any virtual machine will have the same effect.
That's why Javascript interpreters have, blessedly, implemented "Unresponsive Script" warnings that let you kill off those scripts.
Sadly, Adobe hasn't seen fit to offer comparable functionality for dealing with a Flash application that goes berserk. But again, I think that comes down to browsers being in strong competition creating a lot of incentive for them to work hard on efficiency and UX, where Adobe is content to let usability stagnate and bugs fester.
Unresponsive script is different then slow script, flash offers the same unresponsive script warning when a thread gets caught in an infinite loop, and neither environment knows how to deal with a slow script.
Well… Browsers use the same thread for UI updates and JS execution, so every time[1] Javascript is executing your UI is blocked—which means that if your script runs for longer than ~0.2s UI becomes noticeably unresponsive. So IE will decide that your script is unresponsive after 5mil statements, Firefox—after 10 seconds, and Safari after 5. Opera seems not to care
[1] Unless your are using webworkers. Those are executed in separate threads.
Edit: It was incredibly easy to locate this on Google, so I am sure a little research could have worked well for your comment and perhaps saved yourself the possible FUD attribution.
Flash does have an unresponsive script warning. If a script is taking to long to run a box will pop up asking if you want to stop it or let it continue.
I just want Flash to go away because I find it silly that such a huge portion of the web experience is provided by one company instead of a standard like the rest of it.
I'm not sure that "browsing the internet and being shown advertisements on web pages" should be considered a task whose intensiveness is on-par with 3D rendering, 1080p decoding, or encoding.
Or rather, I think it isn't a flattering comment on Flash's efficiency that having it display ads on webpages requires that much processing power.
I don't understand why people think Flash itself is somehow responsible for content that is CPU-intensive (as evidenced by the number of upvotes on your comment).
Flash is a Turing-complete runtime that executes 3rd party content, and the environment that hosts Flash doesn't place any restrictions on how much resources it can use. With such liberties, it's completely expected that some people will produce banner ads that consume 99% of CPU time.
CSS+JavaScript has the same exact problem, so getting rid of Flash wouldn't solve anything. (You may think it does because you're running a Flash blocker, but that's just because the offending content producers haven't migrated to your preferred solution yet.)
I don't have anything but anecdotal data to back this up, which is a huge caveat. Please feel free to knock this down.
But I have to ask: have we seen as much improvement in Flash performance as we have in plain old browser performance? Browsers are improving by leaps and bounds. I'm skeptical that Flash has had a similar performance renaissance.
For one thing, who've they had to compete with until recently? Browser vendors are tripping over one another to improve speed. Until HTML5, you were out of luck for rich content if you didn't want to use Flash.
Now, I agree that eliminating Flash won't solve ads in one stroke of JS. Even so, moving that stuff out of Flash (which browser vendors have little control over) into the browser itself enables vendors to improve whatever performance-troubled cases that HTML5 ads provide.
And, most importantly, improving HTML5 performance, ads or no, is a win across the board, IMO. A faster browser means faster ads AND apps.
It seems that if you own a Mac and like Flash you "need to be converted" in the same way a dogmatic religious person sells you a life of enlightenment.
If you don't like Flash, fine. Just stop selling this fallacy that Flash has some universal special power to drain battery power, or has some special ability to empower the worst ads. It's patently absurd.
Apparently you don't use a Macbook with Flash enabled. The difference is significance. You don't even have to open Activity monitor to see it – you hear it.
It's very impressive and responsive but takes about 55% on both of my 2.8GHz Pro 2 Duo cores on OS X 10.6.
I don't know why our numbers are so different. But I do know that on both my G4 iBook and G4 mac mini, any flash meant that I was maxing out. Since it was a G4, I wasn't surprised. What I was surprised about is that when I got my intel iMac (CPU as above) flash wasn't slow but used most of my CPU power.
That noticeably hits my cpu. I monitor CPU use in the task bar out the corner of my eye, and that was the very reason I abandoned Flash.
Flash ads used to lock up my old G4 frequently.
Perhaps if Flash only ran in your active tab - or rather the one you were viewing - it wouldn't be so bad. It's hardly energy efficient - if I was to leave my computer for 20 minutes it would just keep consuming, whereas you'd hope it would throttle power use.
I'm not sure that "browsing the internet and being shown advertisements on web pages" should be considered a task whose intensiveness is on-par with 3D rendering, 1080p decoding, or encoding.
Browsing the modern web is an incredibly complex activity.
Many of those Flash ads feature high bitrate videos, sound streams, and complex interactive elements. Of course, maybe advertisers shouldn't be building such overbearing creations to try to grab your attention, but don't blame Flash for their excess.
True (and I wasn't too clear), I was pointing out that some sites actually serve up video in h.264 instead of flash when no flash is detected. The native h.264 is more efficient than flash for videos you actually want to see.
Flash tends to be a bear on Macs - even some basic YouTubing makes my 8-core Mac Pro with 10 GB RAM turn all its fans on.
JavaScript, on the other hand, has seen a huge emphasis on performance, with Google's work on V8 and the stuff Apple has been doing with Webkit. I strongly suspect it'll be better performance than Flash.
Am I somehow immune from Flash on Mac being a complete hog? Sure, it uses a decent chunk of CPU, but I rarely if ever get my CPU pegged and fans ramped up as everyone seems to claim.
I'm always curious at what exactly the hell people are doing to their macs to make something like a single flash widget on a page bring their machine to its knees. My 4 year old MBP runs stuff just about as well as my 4 year old Windows laptop.
Flash actionscript runs faster then javascript in pretty much any benchmark, javascript can only go so far before object typing is required to gain parity with other language. As for video, you're trading cpu power for gpu power when running flash vs quicktime, but I'm not sure the gpu will be any less of a drain on battery.
> As for video, you're trading cpu power for gpu power when running flash vs quicktime, but I'm not sure the gpu will be any less of a drain on battery.
Except that using a cpu to emulate things gpu do natively requires far more power. A gpu is a specialized processor so the tradeoff isn't going to be 1 to 1.
I strongly suspect it'll be better performance than Flash.
There is absolutely no empirical basis for assuming this. In actual comparisons between the two -- at least the tests that I've seen -- Flash take the lead.
Removing Flash and being saved the overhead of endless and overbearing ads is good, but as has been said the advertisers will move to HTML5 (they already are), and they're going to do the same full motion video, moving dynamic multimedia, etc, that causes Flash to be such a beast. Worse, it won't be as easily segregatable because to the browser it will be no different than the rest of the web application.
I can have one non-ad flash object on a webpage and it immediately makes my fans spin like mad. What makes Flash be such a beast is not the advertisements with full motion video or moving dynamic multimedia, it's just that Flash completely and utterly sucks on a Mac.
On the other point, any website that lets advertisers take over their content or more space than it should because there are no boundaries (as opposed to Flash) is a website I won't visit anymore, and I suspect a great amount of people think the same.
We have great advertisement providers as Fusion and Google are which are non intrusive. If you wish to add banners and the such you as a content provider should very well be on top of your ad space and avoid shady advertisement companies.
Running NoScript and only enabling javascript and flash when needed likely has a similar effect. The advantage, of course is that with Flash installed but disabled, you can enable/disable it as desired and as battery permits.
You know, what you say brings to mind an interesting point. Right now most people ~98% I think, have javascript enabled all the time. Its a smaller minority of us that use NoScript.
There are no mechanisms that I know of in popular browsers to disable certain html5 features like canvas, video, or audio elements.
So while its possible right now to disable Flash by not installing it or using certain browser extensions, if an ad provider loads an ad that uses the video or audio element you really have no way to disable them. Disabling javascript should prevent canvas-based ads from running, but what's to stop video and audio playing if your browser supports autoplay?
No doubt extensions will be created (or more likely, support will be added to the existing Flash- and/or ad-blocking extensions) if this becomes a significant problem.
I suspect that many Flash apps have a loop running at a certain frequency, which can have about the same performance impact of polling. Compared to an event-driven architecture, a loop is always running, with each iteration consuming CPU even if there is no real work to do that iteration. I had a brief foray as a Flash programmer and noticed this pattern in some of the codebases I saw, and in what the Flash IDE seems to push. Not sure how widely spread it is, or done any measurements on impact, however. But it has the potential to contribute to the CPU sponging the Flash browser plugin is notorious for. Take this effect, multiple it by many little Flash apps per tab, many tabs, many windows, and it can add up.
While it is true that some Flash apps have loop (games must have a loop) it's a bit ignorant to compare it to an event-driven architecture. Flash's ActionScript, which is based on ECMAScript (as is JavaScript), is an event driven-architecture. Events are first class citizens of the framework and bubble up through the display list. Even the loop that gets abused by so many is firing off events.
> While it is true that some Flash apps have loop (games must have a loop) it's a bit ignorant to compare it to an event-driven architecture.
not sure if you meant it, but that comes off as pretty rude.
loops and EDA's are different things, and there is value in comparing and considering them. also, the Flash API's may have first-class support for the notion of events, but that does not mean that every glorified loop involves events, or vice versa. in a pure EDA, no task is performed unless an event of interest occurs. mindless polling and housekeeping loops are one anti-pattern contributing to unnecessary CPU use.
also, while we're being pedantic, technically not all games require loops. I've built plenty myself that had no loops in the application code.
This is more an argument for tools like Flashblock to be built into browsers (like they are on Android) than it is an argument against Flash itself. You can argue that Flash its inefficient but it's just as true that the tasks Flash is used to do are intrinsically complex and power consuming.