Earlier quoted context omitted.
The weight of Chrome as a browser and the more general concept of using the web as a desktop app platform are two different things. I think that when most people complain about "electron apps", what they're complaining about is the latter. If you're complaining about the former, I think that's more fair. Although, I do question whether a third-party browser even has access to the APIs that make Safari's efficiency wh…
> The weight of Chrome as a browser and the more general concept of using the web as a desktop app platform are two different things. I understand where you're coming from, but when someone says says "Electron apps are slow resource hogs", they're fundamentally referring to the underlying engine that makes those apps slow. If that engine was fast and light on resources, the complaint wouldn't exist. Apple _does_ allo…
Firstly: in that case you'd have to compare it to the weight of the entire desktop environment. I would bet money that Gnome + your GTK app is not meaningfully lighter-weight than Chrome + an Electron app. It's just that the former has a privileged place in the OS, and is a dynamically-linked dependency instead of a statically-linked one (using those terms loosely).
Secondly: The web itself is not fundamentally slow. People who aren't web developers love to repeat this mantra, but it's simply not true. That's what I'm trying to get to the heart of here:
1) JavaScript is slower than C++, but it's very rare that enough actual work is being done in JavaScript for it to become a bottleneck (on the UI side), even in complex web-apps. Most of the grunt-work, including recalculating layout, is implemented in C++ as part of the browser.
2) Layout calculation can be slow-ish in extreme cases, but that's a direct tradeoff for the benefit of using the world's most advanced UI layout system, which provides real value.
3) Under normal circumstances an entire web page runs in a single thread, which can be a problem when the occasional expensive operation blocks other ones, but Electron gives you several options for moving expensive operations to separate threads. By default the web view runs in a separate thread from the "main" process, and you can spin up workers or even split your UI into separate web views so each panel gets its own thread.
I think the origins of this myth are:
1) Websites have become much slower than they need to be with the increase in JavaScript dependencies. 90% of this is due to ads and analytics, which couldn't care less about their impact on page performance. The rest has mostly to do with the initial load-time of that 1-2MB script, rather than the runtime of the actual JS code.
2) As with any technology that lowers the barriers to making things, there's been a dilution of less-skilled developers putting things out into the world, decreasing the overall perceived quality of the space. But this isn't an indictment of the technology; if anything, it's a complement. It has to be distinguished from the actual merits of the tech.
> but by using Chromium everywhere, developers don't have to deal with cross-browser issues
I think it has more to do with being able to build and ship copies for all systems through a single channel. Building a "first-class" Mac app (a dock icon, hooks into system APIs, etc.) that uses Safari's web view right now would probably mean opening XCode and writing quite a bit of actual Swift as a wrapper around the web UI. People don't want to do that; it defeats a lot of the purpose. My proposal in my last comment would solve this problem.