Earlier quoted context omitted.
> Webviews are also a moving target so you need a big testing matrix. Even worse, an OS update after you ship your app can spontaneously break it on end user's machines without you knowing or being able to do anything about it. At least with the web, when new browser versions come out, you can fix your site since users essentially "install" it every time they refresh the page. But an installed app that runs on top of…
It's not hard to silently auto-update an Electron app's internals; I assume the same is true for Tauri
Tauri: An Electron alternative written in Rust
141–150 of 438 posts
Re: Tauri: An Electron alternative written in Rust
#142Earlier quoted context omitted.
It seems like Electron is decently optimizable for a lowish memory footprint. Both the Element and Discord desktop client run with consistently ~50MB RAM each.
>~50MB RAM each You _are_ measuring the total RAM usage, right? Something like `free -m` right before starting the application, and then after it warms up? Every time I see these "electron is not heavy, it only uses X MBs of RAM", it turns out that the author looked at a single electron process (out of typically 5-10), and then only measured RSS, completely ignoring shared memory.
But that aside, yeah Discord is pretty heavy. My current instance which is only connected to a single server is eating 555 MB PSS, or 846MB RSS. Definitely not a lightweight at all.
Re: Tauri: An Electron alternative written in Rust
#143Earlier quoted context omitted.
Also: a lot of our "Electron" apps are essentially Electron frontends to the existing web frontend. For example, Slack-the-Electron-app and Slack-the-web-app are fundamentally identical, aside from likely some platform integration features and so on. That means that, likely, a lot of these Electron apps would already work in, for example, a Safari or Edge webview, since the web version has to anyway. I sincerely doub…
Slack originally was platform specific webviews, and migrated to avoid issues like what is mentioned in this thread. One of the engineers who did it has even commented on HN to explain this.
Re: Tauri: An Electron alternative written in Rust
#144Each Electron application seems to think it's the only one running in a computer. It's the only way, I imagine, they think it's acceptable the amount of resources they need to run.
As a developer shipping executables to MacOS, Windows, and Linux today this is the only assumption I can make. I cannot assume that dependencies exist or are the correct version, I can't assume the user knows that package managers exist or that the dependencies shipped by the package managers are correct, I can't assume anything exists on PATH or LD_LIBRARY_PATH, and I can't even assume that libc or libc++ on a syste…
Oh if only that was enough. My Safari is currently using 25.33GB¹ and and it regularly goes over 30.
> 1TB SSDs cost less than $100
Ah, if only it was that easy.
¹ (According to iStat Menus; it's harder to see in Activity Monitor due to the separate processes.)
Re: Tauri: An Electron alternative written in Rust
#145Looks like it uses system webviews instead of bundling a copy of Chromium? This to me seems like the real headlining feature, but strangely I had to dig pretty deep to find it: https://tauri.studio/en/docs/getting-started/technical-detai... I kind of wonder why it took this long for someone to try this approach. It just makes a whole lot more sense on the surface. Interesting thing I just thought about: since users d…
https://github.com/webview/webview
...has a fairly long history. It's great for extremely small application packages (when I tinkered around with it on macOS a few years ago I brought it down to 26 kilobytes).
The usual argument against the idea is that Electron gives you a fixed Chromium version to work against, while the system webviews are a moving target with different underlying browser engines.
Re: Tauri: An Electron alternative written in Rust
#146This kind of makes me think... is there room for a much more stripped down version of Chromium that is suitable for lower memory footprint? Or is this impossible? It looks like Tauri uses system webviews, which use a lot less memory, but the burden is then on the developer to make sure that they build essentially 3 (maybe more) UI's on platforms that might change under their feet. That's why the Electron approach is…
That's why is not always the best approach to appeal to whats people are saying.
Here on HN this was the #1 thing that people used to ask or complain for when the topic was electron.
"They should just integrate with the system browser" was the common saying. But the the burden would be on the developer,who would not only be back to the hellish scenario of multiple browsers implementations but also having to deal with a very skinny SDK to work with.
In the end of the day, the applications deployed on Electron will win, because they will allow developers to do much more and without the application breaking here and there because of the gimmicks of each platform.
When hearing what people say, you must have in mind the kind of the crowd you are listening to. Here on HN for instance is mostly Apple users, mostly developer types, and that's the reason why they ask for the platform browser, after asking for the platform UI, because that's how apple platform users will tend to think.. and the memory thing is the fact that most here are developers.
But that's far from being representative of the whole world of users. So, you might appeal to the particular crowd here on HN, but once you are out there "in the world" you will have a hard time facing contenders that are more resourceful than you, and the worse of all, is that it is by design. You cornered yourself into it because you forgot you are in a bubble..
Re: Tauri: An Electron alternative written in Rust
#147Looks like it uses system webviews instead of bundling a copy of Chromium? This to me seems like the real headlining feature, but strangely I had to dig pretty deep to find it: https://tauri.studio/en/docs/getting-started/technical-detai... I kind of wonder why it took this long for someone to try this approach. It just makes a whole lot more sense on the surface. Interesting thing I just thought about: since users d…
A major benefit of Electron is that you can develop against a single browser and runtime version and don't have to deal with all the small but time consuming compatibility quirks. On Windows the default webview engine is still not the new Chromium but old Edge (WebView2 has to be installed separately), Safari has a fair amount of issues and gtk-webkit can be very quirky as well. This is not so significant if your app…
That way, you're building with cross-platform in mind but still have the option to pick a stable target if you need it, compared to solutions like Electron where you don't have that choice.
Re: Tauri: An Electron alternative written in Rust
#148Earlier quoted context omitted.
I think they're overstating the browser compatibility problem too. It was really bad 15 years ago, but today it is almost a non-issue. Between significantly improved standardization of web technologies, and new tricks like polyfills, I think it has become pretty uncommon for apps to not just work on multiple browsers without any tinkering.
I use Chrome, Safari and Firefox on a Mac. In my experience, unfortunately it isn't true that apps work with very high reliability. This is why I use multiple browsers. I don't want to use Chrome, and I encounter new websites with functionality that don't work properly in Safari or Firefox quite regularly. Some of this is even quite basic functionality. From things like shopping carts where the final payment button d…
Re: Tauri: An Electron alternative written in Rust
#149Earlier quoted context omitted.
Slack originally was platform specific webviews, and migrated to avoid issues like what is mentioned in this thread. One of the engineers who did it has even commented on HN to explain this.
It also launched 8 years ago; the web has changed a lot since then. Edge wasn't even around until 2015, much less being used for webviews.
Call me when Microsoft actually ships WebView2 with the OS.
Re: Tauri: An Electron alternative written in Rust
#150Earlier quoted context omitted.
It's not hard to silently auto-update an Electron app's internals; I assume the same is true for Tauri
The issue would occur if the auto-updater itself broke as a result of an OS upgrade