Hacker News new | ask | show | jobs
by eosrei 3953 days ago
Amazon is switching to JavaScript animated ads to support all devices. This isn't anything against Flash, this is a business decision to reach more eyeballs.

Flash is fast. JavaScript/HTML5/WebGL/etc are just recently getting close to the performance we had in Flash 10+ years ago. Flash is perceived to be slow because it was used to make obtrusive advertising, like JavaScript is used now.

The evil dictator has been replaced, with much fanfare, by a new evil dictator!

An example from 2010 of Flash running in-browser 3D with millions of polygons and lighting effects: https://www.youtube.com/watch?v=szaXvTsoeVs

1 comments

Flash's speed on desktops is not the main strike against it, although it was actually quite bad for many things (the 3d stuff worked better for it because it bypassed its aging 2d rendering engine which no-one left at Adobe understood or could fix). Flash's speed on mobile was abysmal and Adobe tried and failed to fix it for years (after Steve Jobs' famously pointed all this stuff out).

The fact that Flash would store user information separately from the browser in such a way as to circumvent security and privacy models, and did so for years after Macromedia (i.e. pre-Adobe-merger) knew about it, and that Flash had and has as many vulnerabilities as any two operating systems is simply icing on the cake.

Here's a discussion -- also from 2010 -- of Flash's abysmal 2d performance (which entailed fixing an example created explicitly to show how awesome Flash was):

http://loewald.com/blog/?p=3362

Bear in mind, this is Flash's nearly 20-year-old/mature rendering engine optimized to only do minimal screen updates against a five minute hack using a canvas.

And, finally, you need Javascript anyway. Flash actually needs Javascript to even load properly (thanks to the stupid Eolas lawsuit), so it's a case of giving up one evil dictator while keeping a not-nearly-so-evil-and-much-more-useful dictator.

The hatred for flash from me is simple. On osx, almost ALL of my browser crashes had flash on the stack at the time things went belly up.

That, plus flashes uncanny ability to peg a process at 100% for seemingly just moving images about made me not a huge fan. This doesn't mean javascript isn't getting as bad or worse now that things are moving to there, but at least the javascript engines aren't as horrible as the flash runtime was. But if these javascript ads start burning cpu and draining energy from my laptop battery there will be a whole lot more sites getting added to my local firewall rules.

> Flash's speed on desktops is not the main strike against it

Flash's speed on windows wasn't the main strike against it. As a Mac user it was always quite slow, even worse in the PPC days.

I didn't notice any drastic difference between the two operating systems in that regard. I had to test educational software written in Flash on a range of computer systems years ago. Adobe has always supported Apple/Windows evenly, so I'm surprised you would experience a difference.
Oh yes, the security was a huge problem. I absolutely do not want to go back to the land of Flash for many reasons.

Haha! The dictator reference is specifically in regards to intrusive CPU/battery-wasting Javascript ads. Which, I expect to see many more of if I ever disable adblock.

Edit: I just checked out your article and the referenced one. Chris Black responded to your issue with his code in the follow up article:

> 98% of the code optimizations from the last demo completely missed the point of purposefully redrawing the whole screen to compare performance. They were still good submissions, just not for the context of this comparison.

How does he justify erasing the background twice each update? Bear in mind each erase is the single slowest operation in the loop, and if you scale up the complexity of an animation it will become increasingly irrelevant.

Seriously, he is full of it.