Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Would Tauri be a viable alternative to Electron ? #1647

Closed
Nono-m0le opened this issue Jul 10, 2020 · 15 comments
Closed

Would Tauri be a viable alternative to Electron ? #1647

Nono-m0le opened this issue Jul 10, 2020 · 15 comments

Comments

@Nono-m0le
Copy link

Hi Team,

First of all, we highly appreciate the work done on Rocket Chat, so thank you for that.

This is not an issue but rather a question about the feasability to use Tauri instead of Electron for the desktop version ?

In my option, it could improve a lot of aspect of Rocket Chat (security, memory consumption, FOSS, etc ..)

You can find information on this interesting project here : https://github.com/tauri-apps/tauri

@Nono-m0le
Copy link
Author

@tassoevan This wouldn't be a nice solution for the upgrade issue windows client are facing ? (see #1205 or more recently #1670 ) ?

@Vkat14
Copy link

Vkat14 commented Jul 28, 2020

This post needs more up votes. I don't understand how something as simple as install update never worked. Multiple posts on this and the rocket chat team never properly addressed it. And if you try to install it directly from the site, that file is not current either. The only option is coming to Git for it. Right now, the site offers 2.17.9

@Rocket.chat Team please look into this.

@tassoevan
Copy link
Collaborator

@tassoevan This wouldn't be a nice solution for the upgrade issue windows client are facing ? (see #1205 or more recently #1670 ) ?

As stated in https://github.com/tauri-apps/tauri#app-bundles

Self Updater (in progress)

I haven't evaluated Tauri yet (as well React Native Desktop), but it looks promising. Its alpha stage is discouraging though.

@tassoevan tassoevan changed the title [NOT AN ISSUE] Would Tauri be a viable alternative to Electron ? Would Tauri be a viable alternative to Electron ? Sep 2, 2020
@ankar84
Copy link

ankar84 commented Sep 14, 2021

@tassoevan @ggazzo @cazetto hello, team!
That table looks very impressive
image
I could be great solution to lots of current Electron issues like #1670 (broken auto-update issue) and #2098 (huge amount of RAM usage)

Maybe it is time to move to Tauri?

@jeanfbrito
Copy link
Collaborator

Not intended to be done for now.

@ThatOneCalculator
Copy link

@jeanfbrito any chance this could be reconsidered? The current Electron is very resource-heavy (RAM, CPU, storage) and Tauri has gotten even better these last couple years :)

@jeanfbrito
Copy link
Collaborator

I dont think so @ThatOneCalculator . Remember that Electron is like a wrapper around the chromium browser. Tauri is like a wrapper around the OS browser, so each OS will have its on browser being used as the webview, so in Windows it will be Edge that is chromium too.
The resource-heavy is chromium, but not only chromium but depends on what you load on it.
If you open any application that is heavy it will get hungry and take resources.

We made a GSOC project using Tauri last year and Tauri lacks a lot of things that Electron already does and at the end of the day, the resource usage is the same as the same web application being open. https://github.com/RocketChat/Tauri.Desktop.App

Tauri application is smaller because it don't have the browser part integrated, it uses the OS browser view. Electron brings the chromium on the package, so it takes more space. But as always, any POC is welcome if you want to make it.

@ThatOneCalculator
Copy link

the resource usage is the same as the same web application being open

Was that only tested on windows? Since Safari on macOS and WebGTK (WebKit) on Linux are generally a lot lighter... I'll check that project out and give a bit of a performance comparison on my system (Linux) to see if there's a significant difference.

@ThatOneCalculator
Copy link

Also, in Tauri (or even Electron to a certain extent), you can cut down a lot on resources by actually having the application itself render the layout locally (instead of grabbing it from the server) – I'm not sure how much of rocketchat is server side rendered vs client side rendered but it'd definitely be interesting to look into that

@jeanfbrito
Copy link
Collaborator

Rendering locally consuming less resource than server side? I don't think so.
Rocket.chat frontend is done all in react, it's all API calls to the server.
You can take a look at the source code, it's all open.

@ThatOneCalculator
Copy link

Rocket.chat frontend is done all in react, it's all API calls to the server.

So it's an SPA that's client side rendered, yeah? Just making sure since React can also be served side rendered or partially hydrated.

@ThatOneCalculator
Copy link

I gave the current version a try, it seems to be in a very broken state sadly.

@ThatOneCalculator
Copy link

Here's results from a proof-of-concept I made based on https://github.com/thatonecalculator/google-chat-tauri

Features available:

  • Tray icon
  • Autostart
  • Notifications
  • Auto-updater

Resource differences:

Tauri: 66 MiB RAM, 0% CPU used
Electron: combined ~372.3 MiB RAM, Electron uses 0.3% CPU

Side-by-side screenshots (left is tauri, right is electron):

(Looks the same, but Tauri is even a bit sharper with images)

rocketchat

@jeanfbrito
Copy link
Collaborator

Cool, I suggest that you open a server with a lot of channels and messages to see the total overhead.
You can try scrolling public channels on open.rocket.chat.

@ThatOneCalculator
Copy link

ThatOneCalculator commented Aug 1, 2024

Full disclosure: memory usage seems to be inconsistent at best. Sometimes Tauri is far ahead, sometimes they're even, and sometimes Electron is better. This is all using the version loaded from the web, not sure how much better having it run locally would be.

At this point, might just be better to make a native GTK client like Fractal lol

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants