4 ms·
As a developer of an Electron app to me a competing framework that doesn't bundle its own rendering engine doesn't make sense, why would I want to trade control
by fabiospampinato 5y ago
As a developer of an Electron app to me a competing framework that doesn't bundle its own rendering engine doesn't make sense, why would I want to trade control over how my app is rendered for ~100MB of disk space?
I might as well just ship a website at that point, almost everything that makes Electron appealing comes from shipping your own rendering engine.
- VWWHFSfQ 5y agoyou can't ship your own rendering engine on ios > why would I want to trade control over how my app is render for ~100MB of disk space? it depends how much you respect your users
- nerdponx 5y ago100 MB on disk is less than 0.1% of a typical consumer SSD. Memory and processor usage is the concern.
- fabiospampinato 5y ago> you can't ship your own rendering engine on ios That's irrelevant, just because I can't do some things on iOS doesn't mean that I shouldn't do them under desktop OS' too. Just one example: file system watching, if I need to do that with Electron I'll just use `chokidar` and have it working in no time, plus I can share whatever frontend code with the backend too, good luck doing the same with Tauri (given the current state of things anyway). > it depends how much you respect your users I don't know what kind of users you've got but mine care about me iterating quickly on the app, care about having new features, care about having a faster app. Most of them would consider trading any of that for ~100MB of disk space stupid. As I said, if disk space is all you care about you might as well just ship a website.
- Jweb_Guru 5y agoOrder of magnitude memory reduction, not disk space, was the selling point last time I heard. And given how often I hear users complaining about memory consumption in Electron apps, I think that is something pretty attractive, if it pans out.
- fabiospampinato 5y ago> Order of magnitude memory reduction That doesn't make sense to me, you are still using a browser at the end of the day. Sure you can save some memory by not bundling Node (at the cost of making even reading a file much more difficult), but that's not orders of magnitudes.
- gilrain 5y agoNow it's a browser that was probably already in memory for one reason or another, not necessarily a process per Tauri app.
- fabiospampinato 5y agoThat's a good point, that will save you some memory unless you happen to be in a scenario where for example you use Chrome under macOS and a single Tauri app, which would then use Safari under the hood, meaning still multiple browsers. But I think that would save much less memory than people think. A bare-bones hello-world Electron app consumes about ~100MB of RAM (rough figure since it depends on many factors), maybe you can bring that down to ~20MB by sharing a common browser instance (I doubt it, a Chrome tab takes like ~50MB for me right now), but if your app uses 1GB+ of memory that has way more to do with how the app is coded than by having to spawn another instance of the browser. Basically you won't get a memory hungry app consuming 10x less memory by running it as a website.
- francisl 5y agoAlso electron require multiple node backend services which each eat memory like crazy (based on electron app I use). Have one, real Multithreaded +, more efficient backend, will reduce memory and offer better performance. Wails is also an alternative that does just that. Shared Web UI engine + Go compiled backend.
- fabiospampinato 5y ago> Also electron require multiple node backend services which each eat memory like crazy (based on electron app I use). AFAIK Electron requires 1 Node instance (you can disable it for renderer processes and you can have 0 WebWorkers or only WebWorkers with Node.js disabled) which consumes like ~50MB or something like that, which probably accounts for stuff other than Node.js too, if the app you are using require multiple Node processes that use huge amounts of memory they are just badly written. > Have one, real Multithreaded +, more efficient backend, will reduce memory and offer better performance. You can't just share Node.js across multiple apps, Tauri just doesn't bundle it at all, which is a whole different story with mostly downsides from my point of view.
- pavlov 5y agoApple's brand new iMacs with the M1 CPU only have 8 GB of RAM. If every little desktop widget loads its own browser engine, most of that RAM will be spent on redundant copies of Chromium. If your Electron app is something that you expect users to run almost exclusively, then no problem. If it's just another little client app for some service, please consider a solution that would reduce its memory footprint.
- fabiospampinato 5y agoThat's a fair point, but just ship a website then, much easier and pretty much same result. It makes sense to use frameworks like Electron if they enable new capabilities for your app, and Electron is very good at that, bundling Node.js with it, which allows you to share code between frontend and backend and tap into the same ecosystem of packages, plus chances are you already know Node.js, Tauri is enabling 0 of this, at least presently.
- fabiospampinato 5y ago> much easier and pretty much same result. Actually better results even, because under macOS for example the webview is provided by Safari, but if you are using Chrome/Firefox as your browser of choice and you are using a Tauri app now you are using 2 browsers effectively, while if you ship a website you can use that website with whatever browser you prefer.
- hatch_q 5y agoAnd with WebView, RAM will be spent on redundant copies (instances) of WebView.
- smoldesu 5y agoIt's about memory management more than it is binary size. Rust is notorious for being turbo-charged with every LLVM optimization on gods green earth, so much so that the actual syntax of the language is beholden to the opinion of the compiler. Either way, I see it as a great step in the right direction, and would be perfect for apps like Discord or Spotify.
- fabiospampinato 5y agoMost of the memory usage will come from the renderer process, which in a Tauri app is still a browser.
- nsonha 5y agoAnd most people have problem eith Electron's ram usage, which I don't think this addresses. No one really cares about 100mb