News for hackers. Stuff that matters.
Re:Dropping Adobe Flash boosts Apple's MacBook Air battery l... by stevenwei on Thursday November 04, 2010 @06:07PM (#1871020)
I'm not sure this is particularly significant...as you could say the same thing about many tasks.

Not running video encoding on your Macbook Air boosts battery life by 2 hours.

Not running 3D games on your Macbook Air boosts battery life by 2 hours.

Not watching 1080p movies on your Macbook Air boosts battery life by 2 hours.

Re:Dropping Adobe Flash boosts Apple's MacBook Air battery l... by abstractbill on Thursday November 04, 2010 @06:19PM (#1871056)
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.

Re:Dropping Adobe Flash boosts Apple's MacBook Air battery l... by msbarnett on Thursday November 04, 2010 @06:25PM (#1871072)
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.

Re:Dropping Adobe Flash boosts Apple's MacBook Air battery l... by abstractbill on Thursday November 04, 2010 @06:45PM (#1871129)
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.
Re:Dropping Adobe Flash boosts Apple's MacBook Air battery l... by msbarnett on Thursday November 04, 2010 @06:56PM (#1871174)
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.

Re:Dropping Adobe Flash boosts Apple's MacBook Air battery l... by seanalltogether on Thursday November 04, 2010 @07:06PM (#1871219)
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.
Re:Dropping Adobe Flash boosts Apple's MacBook Air battery l... by rimantas on Friday November 05, 2010 @04:33AM (#1872442)

  Unresponsive script is different then 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.

Re:Dropping Adobe Flash boosts Apple's MacBook Air battery l... by sans-serif on Thursday November 04, 2010 @09:47PM (#1871653)
Yeah, can somebody tell me how can this be so hard to do?
Re:Dropping Adobe Flash boosts Apple's MacBook Air battery l... by rosser on Thursday November 04, 2010 @10:02PM (#1871690)
Because it's more or less an instance of the halting problem?
Re:Dropping Adobe Flash boosts Apple's MacBook Air battery l... by justsee on Thursday November 04, 2010 @07:04PM (#1871214)
Flash has had 'Unresponsive Script' warnings as long as I can remember, maybe since 2000?
Re:Dropping Adobe Flash boosts Apple's MacBook Air battery l... by msbarnett on Friday November 05, 2010 @02:41AM (#1872271)
Interesting, thanks. Like earl, I've never seen one on OS X.
Re:Dropping Adobe Flash boosts Apple's MacBook Air battery l... by earl on Friday November 05, 2010 @02:05AM (#1872202)
I've never seen one, and I use a mac.
Re:Dropping Adobe Flash boosts Apple's MacBook Air battery l... by tomlin on Thursday November 04, 2010 @11:03PM (#1871841)
Really? Seems like I get one for Flash that looks a lot like this: http://bp0.blogger.com/_3xgfV_ITspY/Rsm9saAQ-rI/AAAAAAAAAD4/...

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.

Re:Dropping Adobe Flash boosts Apple's MacBook Air battery l... by SteveC on Friday November 05, 2010 @08:39AM (#1872896)
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.
Re:Dropping Adobe Flash boosts Apple's MacBook Air battery l... by xuhu on Friday November 05, 2010 @07:59AM (#1872782)
Here's a comparison of playing 720p video using Flash versus Mplayer: http://imgur.com/fq5c1

Mplayer is roughly twice as fast, and both are using libavcodec for decoding H264.

Re:Dropping Adobe Flash boosts Apple's MacBook Air battery l... by loewenskind on Friday November 05, 2010 @10:10AM (#1873208)
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.
Re:Dropping Adobe Flash boosts Apple's MacBook Air battery l... by msbarnett on Thursday November 04, 2010 @06:12PM (#1871032)
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.

Re:Dropping Adobe Flash boosts Apple's MacBook Air battery l... by pavlov on Thursday November 04, 2010 @06:54PM (#1871166)
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.)

Re:Dropping Adobe Flash boosts Apple's MacBook Air battery l... by wonderzombie on Thursday November 04, 2010 @09:21PM (#1871601)
"CSS+JavaScript has the same exact problem"

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.

Re:Dropping Adobe Flash boosts Apple's MacBook Air battery l... by boltofblue on Thursday November 04, 2010 @08:04PM (#1871396)
Webit is starting to provide rendering and animation that is more native and more efficient.

Simple fact is, Flash is not as good as we need it to be.

Re:Dropping Adobe Flash boosts Apple's MacBook Air battery l... by tomlin on Thursday November 04, 2010 @10:58PM (#1871827)
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.

Re:Dropping Adobe Flash boosts Apple's MacBook Air battery l... by Yaggo on Friday November 05, 2010 @01:18AM (#1872130)
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.
Re:Dropping Adobe Flash boosts Apple's MacBook Air battery l... by tomlin on Friday November 05, 2010 @11:18AM (#1873466)
Re:Dropping Adobe Flash boosts Apple's MacBook Air battery l... by abstractbill on Thursday November 04, 2010 @06:55PM (#1871167)
...it isn't a flattering comment on Flash's efficiency that having it display ads on webpages requires that much processing power.

Amusing of course, but not even close to being accurate. Take a look at this for example:

http://www.unitzeroone.com/labs/alchemyPushingPixels/

That's rendering about 300,000 particles in 3D, in realtime. On my four-year-old macbook pro, the cpu usage is barely noticeable.

Re:Dropping Adobe Flash boosts Apple's MacBook Air battery l... by g_lined on Thursday November 04, 2010 @08:24PM (#1871447)
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.

Edit: removed typo

Re:Dropping Adobe Flash boosts Apple's MacBook Air battery l... by earl on Friday November 05, 2010 @02:06AM (#1872205)
Ditto. I just ran that bit of flash and the whirring noise in the background is the fans in my laptop. Plus 60% cpu usage on each proc.
Re:Dropping Adobe Flash boosts Apple's MacBook Air battery l... by bilban on Friday November 05, 2010 @07:53AM (#1872776)
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.

Re:Dropping Adobe Flash boosts Apple's MacBook Air battery l... by elblanco on Thursday November 04, 2010 @09:24PM (#1871609)
Depends what's on the advertisement.

There's nothing that prevents somebody from writing ads in javascript/canvas and using your browser to fold proteins.

Re:Dropping Adobe Flash boosts Apple's MacBook Air battery l... by ergo98 on Thursday November 04, 2010 @06:55PM (#1871169)
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.

Re:Dropping Adobe Flash boosts Apple's MacBook Air battery l... by elblanco on Thursday November 04, 2010 @09:29PM (#1871615)
I can't wait till we all have to install some kind of "canvas" block extension on all our browsers.
Re:Dropping Adobe Flash boosts Apple's MacBook Air battery l... by evo_9 on Thursday November 04, 2010 @06:10PM (#1871026)
Adblock and/or ClickToFlash also would do the trick.
Re:Dropping Adobe Flash boosts Apple's MacBook Air battery l... by protomyth on Thursday November 04, 2010 @06:43PM (#1871121)
To a point, but some sites actually serve up different content if your browser can't do Flash.
Re:Dropping Adobe Flash boosts Apple's MacBook Air battery l... by evo_9 on Thursday November 04, 2010 @07:23PM (#1871286)
If the goal is to remove/control Flashes consumption of resources - aka the original post - then my suggestion stands.

We are talking about Flash - not ads per se.

Re:Dropping Adobe Flash boosts Apple's MacBook Air battery l... by protomyth on Friday November 05, 2010 @12:19PM (#1873730)
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.