Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.



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.


  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.


Yeah, can somebody tell me how can this be so hard to do?


Because it's more or less an instance of the halting problem?


Flash has had 'Unresponsive Script' warnings as long as I can remember, maybe since 2000?


Interesting, thanks. Like earl, I've never seen one on OS X.


I've never seen one, and I use a mac.


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.


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.


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.


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.)


"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.


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.


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 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.


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


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.


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.


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.


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.


I can't wait till we all have to install some kind of "canvas" block extension on all our browsers.


Adblock and/or ClickToFlash also would do the trick.


To a point, but some sites actually serve up different content if your browser can't do Flash.


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.


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.




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

Search: