Hacker News new | ask | show | jobs
by cubefox 1063 days ago
I don't quite get why the Flash plugins were do slow on mobile. On Windows desktop, Flash was much faster than other NPAPI plugins. Most other plugins froze the whole browser for a second or so (Java even longer), while Flash didn't do that. And at the time, early native "HTML5 replacements" for Flash ads/games were actually slower than Flash.
2 comments

Flash was software rendered almost exclusively. It also had quality options that let you scale the software renderer down a whole lot. But it still required a beefy CPU to push all those pixels. On mobile, you don't get a fast CPU - you get hardware accelerated EVERYTHING. Everything has to be done on GPU. Hell, iPhones still have dedicated JPEG decoders in them.

And vector rendering on GPUs is a pain to do, even more so with Flash Player's rendering quirks. Adobe's official solution to hardware rendering on Flash was Starling Framework, which rendered all your assets to bitmap textures and then gave you a DisplayObject-compatible API that triggered Stage3D renders under the hood.

In Ruffle we use a tesselation library to render on GPU. This preserves vector scalability but it has other issues. Most movies work fine with it, but we have to waste time tessellating[0] assets, and in certain contrived cases we tesselate things wrong and movies look polygonal.

[0] Which we hid behind existing Flash preloaders. We don't even support progressive download yet! But the alternative was Homestuck hanging your browser for minutes on end.

I always remember Flash being really fast at the vector calculation but and absolute hog on output rendering. So higher screen resolution hammered the CPU even though everything was setup.
I want you to know that I laughed very hard at finding a comment complaining about Homestuck in Ruffle unexpectedly here, thank you.

To be fair, on the single 100 mbit link the site used to be on, for new things being posted, that would be historically accurate...

[S] Cascade and [S] ACT 4 were my test cases for the "large movies hang the browser" bug[0]. Homestuck loves stressing out Ruffle's tessellator.

Oh and yes, the opening bars of "Doctor" are permanently burned into my head now.

[0] https://github.com/ruffle-rs/ruffle/pull/7858

It's okay, Cascade was a great test case for Newgrounds, too. ;)
Flash plugin was extremely well-optimized, it was one of the very few users of the original Pentium MMX extensions, and later SSE. That's also why they had such a difficult time porting it to 64 bits.

The Flash renderer was also state-of-the-art for the moment, with really awesome anti-aliasing and blending. All while using just fixed-point integer arithmetic.