A better comparison would be against the performance of game logic, which in a game engine can easily become the bottleneck from all the conditionals, random memory accesses and sequential dependencies. And even there they don't sit on nearly as many layers of abstractions as a web page does.
This comes at the cost of productivity; building a web site is a few orders of magnitude more productive than using the latest game engines. Of course, sitting on the DOM and its many quirks as well as its reflow/redraw cycles can make it harder to reach 60FPS in the browser.
But at least you're saving yourself from a world of low-level pain.
If this is the direction the web is going, I think it’s worth considering a shift to technologies better suited for the task (QML, for instance, looks like a great preexisting application-centric alternative to HTML). Old browsers that don’t support this tech would be taken care of by HTML polyfills until adoption of new browser versions is high enough.
The DOM is a dinosaur unfortunately, it just gets the job done for most basic websites. CSS is also a language made for the DOM. The thing is, the DOM isn't required for a web page. Netflix could have coded up their entire UI on a Javascript 2D game engine and could have ended up with a faster app for sure. But CSS and the DOM make it much easier to work with text + links, that imo it's worth it for the performance drop of animations.
QML is a tremendously easy way to leverage OpenGL acceleration.
PS: Top graphics cars AMD Radeon R9 295X2 is 11+ TFlops, 1920 x 1080 x 60 = 124 million. So, these cards have ~100,000 Flops per pixel per frame @1080p.
Its not because shaders are now turing complete that its a free pass to use these features all over the place, they often come with a noticeable performance cost, which I admit is lesser and lesser every year, but still.
Also, having recently completed the port of a next-gen AAA title, I can definitely say most shaders stay far from turing completeness, even on current consoles. We shipped the game with at least 75k generated shaders and I'm fairly certain less than 20% of them made use of those features.
Finally, the numbers you mention are from an ideal benchmark case and assuming GPU usage is maximized. Real world conditions will definitely lower these numbers.
Modern consoles GPUs have dozens of metrics in their profilers and every single one of them can be a major bottleneck. Its near impossible to achieve 100% GPU usage in a game. We're happy above 80%.
How have you come to this conclusion?
Even "easy" things on the web like text input boxes, scaling for different resolutions while keeping text crisp, and scrollable content areas are much harder in a game engine.
It may be personal experience but it doesn't change the fact that you're working on a much lower level in a game engine with long iteration times while a browser reloads almost instantly and builds on layers after layers of abstractions.
That argument still applies to everyone.
At the end of the day, one of the few metrics which really matters is the return on investment.
A lot of software can afford iterative improvements as well, so its a great idea to start off with extreme convenience and optimize as you scale.
But for 99% of the web this doesn't matter at all. I'll take declarative over imperative any day if it means I can spend the saved time polishing the product instead of debugging or optimizing.
You have no idea the amount of debugging and optimizing which goes into developing a video game. Having worked on both I can say time spent debugging/optimizing is at least an order of magnitude more than for web applications. Its much worse when you're using an in-house engine as well.
A unified-ish platform might be a benefit to their developers, but this has also been a net loss for Netflix's end-users. :/
Are you getting code which any john developer can pick up and develop on, or is it something which requires knowing a special purpose programming language and corresponding frameworks?
From my point of view, I want to see a big company build a Canvas or WebGL UI that goes to thousands of people. We can speculate, but someone actually trying what you mention is the only way to find out if it works in the industry.
I suppose you could progressively enhance your HTML version to override certain DOM elements with WebGL UI, but I have no idea how modern screenreaders would handle it.
Everything is a tradeoff, if you want the ease of HTML+CSS then be prepared to pay the performance hit, and if you want lighting fast GUIs, be prepared to pay the productivity hit.
We are willing to pay this extra cost for these elements because they are often required to be quickly put together and then iterated on over a long period of time in a very dynamic and changing system. Some elements may be moved from Scaleform into a more native implementation but for the most part it is left to be slowly parsed and inefficiently rendered.
Basically, where we need fast changing interfaces that arent necessarily implemented by high skill programmers then we are going to take a performance hit to get the same level of visuals we could get if we had the time and manpower to approach it better.
Like simcity (https://news.ycombinator.com/item?id=5359143)
Either way, it is undeniably harder to sell new consoles, or games for those consoles, when screenshots of them looks the same as it did in the previous generation, even if those screenshots were taken at 60fps.
Mobile devices for example still have a hard time going over the quarter-million mark and thats assuming the GPU is near 100% usage, which in reality is probably closer to 60%.