4 ms·
Order 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 consump
by Jweb_Guru 5y ago
Order 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.
- francisl 5y ago> just badly written. Ins't the easy answer. Each time a dev want to ignore valid comments. I have the following electron app running: Spotify, Figma, VS Code, Discord, Slack. They all use more than 1 helper. Consuming between 600mb to 3.5gb. Slack is much better than it was. But I wish they switch to something like Tauri or Wails in the future.
- fabiospampinato 5y agoOf those apps I can only say that VS Code is well written and that Spotify is junk. Is 600mb too much for VS Code? I guess it depends on what you are doing with it and which extensions you have installed etc., if you are running a pretty bare-bones installation and seeing 1GB+ memory usages in VS Code please open an issue in their issue tracker and tag me (same username as in HN). > Slack is much better than it was. And that didn't happen by switching to the website approach, I think you'll be disappointed if any of these apps end up switching to Tauri or Wails without significantly improving their code too. Which is why I'd predict no major player will jump ship.
- francisl 5y agofor my work, vscode take between 1.5 to 2.5gb. Nothing has change since start using it 4 years ago, and my experience is consistent with my coworkers. I keep using it because it 'feels' the best overall. No magical issue will fix that, node is memory hungry as is java. Calling an app junk to justify is argument is unconvincing. Its still a widely used app that works as good as the competition. In the case of slack, their optimisation endeavour seems to cost them quite a lot. But sure I don't have the number. If they would have start the project in Tauri or Wails at the beginning, would that saved them the refactoring? I don't now. But we will need more team using that kind of alternative to gain the knowledge and real benefit. At this point I rewriting a toy project from electron to wails and its great. But well, it's only a toy project.
- oscargrouch 5y agoNot if you take one of the biggest selling points of Electron. Im working on something not quite the same thing but that deal with all this, and being able to ship with a web rendering engine and not using whatever its on the system is actually better giving all the power, bindings, compromise you can make that you are unable when you can only deal with a abstract wrapper to every web rendering engine out there. Lower memory footprint but with much less features and a generic "no sir, cant do such a thing.." as a answer to users that will need important features to ship applications with this.
- Jweb_Guru 5y agoOf course it's less convenient for developers not to ship a rendering engine. But should developers' need always come before users' needs, especially for applications that live and run on their own PCs?
- oscargrouch 5y agoIts not also about user needs, given the final application will have access to more functionality, also guaranteeing things will work. I agree that Electron is user hostile in the way it uses memory, but there's an answer in between the Electron and what Tauri is offering here. Tauri could have a embedded engine and yet propose a better architecture and better use of memory in consequence. The best of both worlds. In Chrome for instance, each tab is equivalent to a app, giving is a whole isolated process and yet it doesnt kill your machine even with many tabs open.