6 ms·
> Is "just stick Chromium into all your apps" seriously the best we can do as an industry? Yes. What other rendering engine are you going to use? If your answe
by zarzavat 5y ago
> Is "just stick Chromium into all your apps" seriously the best we can do as an industry?
Yes. What other rendering engine are you going to use? If your answer is anything but a web browser rendering engine, then consider that any serious UI toolkit in 2022 is certainly going to need a WebView UI component: so if you want the WebView UI component to be consistent across platforms (you want this), then you will have to bundle a web rendering engine anyway. In that case, why not just use the web rendering engine as your main rendering engine?
There’s nothing wrong with Electron as a concept. The issue is with either: blink being under optimized for this use case, or bad Electron apps.
- jokethrowaway 5y agoYou could use a webview shared at the system level, so you don't have in memory 4 different browser engines.
- oceanswave 5y agoBrowsers themselves don’t do this for security snd sandboxing reasons. Each tab is another instance.
- kevincox 5y agoEach tab is a partial instance. There are still many resources that are shared globally for performance and memory use reasons.
- gmueckl 5y agoBut operating systems are free to map the same read only memory pages (e.g. program code) into different process address spaces. This is an optimization that running processes are generally completely oblivious of. But it only works when e.g. the program code is mapped into memory from the same file. If every program has a private copy of the same library (even if it's bit for bit identical), the operating system doesn't have enough information to pull this off.
- proto-n 5y agoI think the part "if you want the WebView UI component to be consistent across platforms (you want this)" is a reference as to why a built in webview won't be good enough.
- tentacleuno 5y ago> There’s nothing wrong with Electron as a concept. I'm mainly avoiding it because I want to make an app I can use (after all, I'm primarily making this for myself), and not just have a desktop app for... someone. My laptop only has 4GB of RAM, so Electron is off the cards for what I need.
- dkersten 5y agoThis always frustrated me with Slack. It has often been the thing running on my computer using the most RAM, yet Slack is never the primary tool I'm using the computer for. That is, communication is always a secondary thing to support my work doing something else or to allow me to do that something else in a team. Its about that other work though, not the communication. Maybe some day soon I'll have a laptop with 32 GB of RAM and there will be more spare resources available for Slack to eat, but until then, I really dislike running Slack. So yeah, I still greatly prefer desktop applications to use native UI's and prefer to avoid browser applications where I can. But its becoming increasingly hard. Of course, I, too, am building browser things, since that's what the industry seems to demand, so I'm not really helping the situation. I do keep meaning to learn Flutter though.
- tentacleuno 5y ago> This always frustrated me with Slack. It has often been the thing running on my computer using the most RAM, yet Slack is never the primary tool I'm using the computer for. That is, communication is always a secondary thing to support my work doing something else or to allow me to do that something else in a team. Same with me, but s/Slack/Microsoft Teams. I personally find it absolutely horrendous to use and wouldn't recommend it. > Of course, I, too, am building browser things Same. That's what I'm primarily familiar with, especially React. I hope some day we have something like React Native for desktop, where it integrates with the native widgets of the platform (Qt, perhaps?) and you just integrate them with your app through components... like React Native on mobile. It's such a shame this space isn't being properly explored yet.
- dbbk 5y agoI'm not even sure that laptops are still sold with 4GB of RAM? You have a very niche usecase.
- newaccount74 5y agoI would say, use native webviews, eg. WKWebView on macOS. But unfortunately it comes with occasional bugs that are impossible to fix for app developers, so if you want complete control you can't use it
- foxhill 5y ago> What other rendering engine are you going to use? the native window environment? > any serious UI toolkit in 2022 is certainly going to need a WebView UI component citation needed. why do slack and discord - communication applications - need a web view component? > In that case, why not just use the web rendering engine as your main rendering engine? because, aside from the frankly obscene memory usage, it adds so much to the binary (mIRC used to fit on a floppy), it’s slow, is bad for battery usage, it doesn’t look in line with native apps, and it’s a huge attack vector.
- qorrect 5y ago> it’s a huge attack vector. I'm confused by this phrase. Wouldn't it have a 'huge attack vector space' ? I never really understood that phrase.
- klabb3 5y ago> the native window environment? I'd rather build an app that doesn't require me to start with the question "which OS and window environment are you using?" followed by "sorry, we couldn't afford to build for that". The idea that app developers have resources, skills and manpower to build ~3-7 UIs using ~2-3 different stacks – for exactly the same app – is imo more preposterous imo than assuming most users have enough ram to run a chrome+node instance. The failure of standardizing UI has led to this. Electron is a stop-gap, a good one. As a Linux user, I am very happy that Electron exists, otherwise I would have far fewer apps. Yes, Electron hogs resources. I am personally using Tauri, which has a much lower footprint. Importantly, I can write my app once.
- zozbot234 5y agoThe Web is semantically consistent across platforms. There's no need to use the exact same rendering code on every platform.
- Spivak 5y agoLook I get the idealism but being able to target a single version of a single browser at a time is vastly simpler than dealing with every browsers quirks and missing features.
- ClumsyPilot 5y ago> There’s nothing wrong with Electron as a concept. There is nothing wrong with Communism as a concept. Nack in the real world, open Whatsapp desktop and scroll though any chat dense with images, it takes me over 40 minutes to acroll back 1 year on a 12-core ryzen. On Telegram Desktop, native client, this takes 30 seconds. If you think this spitefull disregard of end users is justified, you live in cloud coocoo land