this post was submitted on 18 Sep 2023
541 points (92.1% liked)

linuxmemes

20880 readers
5 users here now

I use Arch btw


Sister communities:

Community rules

  1. Follow the site-wide rules and code of conduct
  2. Be civil
  3. Post Linux-related content
  4. No recent reposts

Please report posts and comments that break these rules!

founded 1 year ago
MODERATORS
 
top 50 comments
sorted by: hot top controversial new old
[–] [email protected] 229 points 1 year ago (32 children)

People that are upset about electron should consider it’s not:

Electron App vs Wonderful Fully Supported Native Linux Application

The reality is that your choice is largely:

Electron App vs No App (maybe running their windows app in wine if you can get that to work)

It’s not like companies are going to go build a native linux app but electron got in their way. It was always electron or no support.

So if you like the app, remember that the ram and the cpu you paid for doesn’t provide value unless it’s doing something. There’s no trophy you get at the end of your life for “most cumulative ram left idle”

[–] [email protected] 44 points 1 year ago (1 children)

I think proprietary Electron apps better run in browser anyway because of trackers that you can disable via extensions.

load more comments (1 replies)
[–] [email protected] 35 points 1 year ago (4 children)

So if you like the app, remember that the ram and the cpu you paid for doesn’t provide value unless it’s doing something. There’s no trophy you get at the end of your life for “most cumulative ram left idle”

This is a damn homicide lmao

[–] [email protected] 17 points 1 year ago (1 children)

Running electron apps becomes a genuine ram issue when running heavy ram workloads like running heavily modded games

load more comments (1 replies)
load more comments (3 replies)
[–] [email protected] 33 points 1 year ago (4 children)

There’s no trophy you get at the end of your life for “most cumulative ram left idle”

Some people like to use more than 1 app you know.

Also, RAM is never ever idle. It is used as filesystem cache when not used by programs thus speeding up read accesses significantly.

load more comments (4 replies)
[–] [email protected] 27 points 1 year ago (5 children)

A lot of the time, the alternative would be a website running in the browser.

load more comments (5 replies)
[–] [email protected] 23 points 1 year ago

Well, there's also Tauri which requires slightly more testing since you actually use the device's built-in browser, so there might be differences. The upside is a much smaller bundle size, quick start-up times and often less RAM usage than with Electron.

[–] [email protected] 16 points 1 year ago

What about laptop battery life? More CPU usage = less battery life. WHY DOES NO ONE GIVE A FUCK ABOUT BATTERY LIFE???

The single most reason I switched from Spotify to Apple Music is that I was sick of seeing the Spotify macOS app at the top of the "High Battery Usage" page on Activity Monitor. I also actually noticed less battery life. Fuck Electron. I avoid apps made in it like the plague.

[–] JackbyDev 16 points 1 year ago (1 children)

Doesn't Qt provide native, cross platform UI? I agree with your post though.

load more comments (1 replies)
[–] [email protected] 14 points 1 year ago (13 children)

lmao, yea. Besides, it’s not like electron is that bad either. We aren’t in 1990, why would you care if electron uses a gb of ram or ten processes or this or that… they think that native means good, but more often than not native means a shitty ugly unusable application that will work (not really) just on windows

load more comments (13 replies)
load more comments (23 replies)
[–] [email protected] 56 points 1 year ago (5 children)

This might be a hot take but I've noticed some complicated electron apps are faster than some simple native apps. The striking example to me is how Vs code runs better and has a lower startup time than the stock Windows 11 File manager.

A well written electron app is better than a poorly written native app sometimes.

[–] [email protected] 56 points 1 year ago (8 children)

I mean, sure, but:

  1. The Windows File Manager is really just awful in that regard. You can get alternative file managers that start up in a fraction of that time, with more features.

  2. Startup time isn't really the worst of it. RAM usage is worse. And if a program uses lots of RAM, it will still appear quite performant. But it makes everything else on your system slower.

[–] [email protected] 21 points 1 year ago (2 children)

There's also the added CPU overhead from using JavaScript for everything to contend with.

load more comments (2 replies)
load more comments (7 replies)
[–] [email protected] 30 points 1 year ago (4 children)

That's not a compliment to Electron, that's a heck of an indictment to Microsoft messing up the File Manager.

load more comments (4 replies)
[–] [email protected] 19 points 1 year ago (1 children)

I mean sure once you start getting big enough, you'd probably be bundling all the features of chromium anyways, and any extra bloat is meaningless. Chromium and thus electron are extremely well optimized so if you are using the full feature set it will be fast.

But please stop using vscode as the benchmark electron app. It is not comparable. No other application in history has as large of a talent pool as vscode and It's possible none ever will either.

load more comments (1 replies)
[–] [email protected] 11 points 1 year ago (3 children)

That's because all the important bits in VSCode are reimplemented in C++

load more comments (3 replies)
load more comments (1 replies)
[–] [email protected] 47 points 1 year ago (4 children)

What does Ctrl shift I do (I'm not at my computer and I don't have any electron apps installed)

[–] [email protected] 73 points 1 year ago (1 children)
[–] [email protected] 12 points 1 year ago (3 children)

Does it really have to? Vscode is built on top of it, I don't think it's ever opened chromium dev tools for the app (maybe I'm wrong?)

[–] [email protected] 32 points 1 year ago (1 children)

Some apps can disable it, I think Discord does so people don't get tricked into pasting random scripts into the console

[–] [email protected] 11 points 1 year ago* (last edited 1 year ago)

That is true, though it's possible to re-activate them through a configuration file in discord. However, a developer can fully disable the tools if they wish

load more comments (2 replies)
load more comments (3 replies)
[–] [email protected] 43 points 1 year ago* (last edited 1 year ago) (4 children)

ITT: some people are mad the web became the application platform of choice, in part due to handy dandy cross platform app tools like Electron and accessible languages like JavaScript.

There is no perfect answer. Qt isn't using the platform's native capabilities to the fullest extent either. Qt requires a "wrapper" too--all those libraries your app depends on, to name a few (unless you got a commercial license and are compiling statically, you rich devil).

Let's celebrate the onslaught of apps that work with Linux instead of trying to scare off developers any more than Linux already did. Make love not war. <3

In my experience, Electron and other "web wrapper" apps run just fine and I have enough CPU and RAM to run a dozen of them alongside my 50 browser tabs. Slack, Discord, VSCode, Teams, IRCCloud, it all works fine. Hardware is cheap compared to my time.

[–] [email protected] 14 points 1 year ago (2 children)

It always seemed over-complicated to me to use web technologies to create a desktop application and run it in what is essentially a browser. The tool-chain of modern web and electron apps also seems overly complicated to me (writing in a slightly different language then transpiling to an interpreted language).

I don't find JS any more accessible than any other language with automatic memory management. JS is actually a bit of mess due to bolting on new features while keeping backward compatibility.

I don't mind using electron apps. VS Code is pretty great.

I think Java Swing was the apex of desktop development :)

load more comments (2 replies)
load more comments (3 replies)
[–] [email protected] 34 points 1 year ago (1 children)

JS land is the America of development. You may not like it, but it's the encumbent power and it'll be that way for a long time so might as well enjoy the plus sides

load more comments (1 replies)
[–] [email protected] 34 points 1 year ago (5 children)

Just wait for Tauri for mobile so there will be no reason for somebody to use Electron.

[–] [email protected] 12 points 1 year ago (1 children)

I like that for every Electron meme there's a Tauri comment.

load more comments (1 replies)
load more comments (4 replies)
[–] [email protected] 28 points 1 year ago

Where Linux

[–] [email protected] 28 points 1 year ago (2 children)

I'll take shitty electron apps over winforms any day of the week.

load more comments (2 replies)
[–] [email protected] 23 points 1 year ago (1 children)

The problem is that even Microsoft choose to use Electron when they built Teams. MS got loads of developers and Teams is really a big product in terms of users.

[–] [email protected] 10 points 1 year ago (1 children)
[–] [email protected] 16 points 1 year ago (1 children)

VSC is an interesting case because they opted not to use any JS frameworks for performance

[–] [email protected] 17 points 1 year ago (2 children)

💀 writing a text editor in electron and worrying about performance is wild /hj

load more comments (2 replies)
[–] [email protected] 22 points 1 year ago* (last edited 1 year ago) (4 children)

Not very found of them either but it's hard to do without them, matter wise.

[–] [email protected] 24 points 1 year ago (17 children)

it’s hard to do without them

Just load the wrapped website in a browser.

[–] [email protected] 28 points 1 year ago (4 children)

Or even better, encourage native apps.

load more comments (4 replies)
load more comments (16 replies)
load more comments (3 replies)
[–] [email protected] 17 points 1 year ago (3 children)

Dude, if it doesn't hog memory then what's the problem?

[–] [email protected] 35 points 1 year ago (7 children)

It kinda do though. VSCode, without a project open has 10 processes running and uses over a half gig of ram. I like VSCode to be clear. I also like discord but it's just a chat app and apparently needs a half gig itself and 6 processes.

[–] [email protected] 22 points 1 year ago (3 children)

You should come over to vim. It only takes 12 months of intense training and an additional 3 years of super glueing random rc file configs together before it works how you want it to

[–] [email protected] 14 points 1 year ago

Yeah, but once it's all setup, you get to see all your coworkers roll their eyes when they see you use vim at every job from that point on

So, all worth it in the end 👌

Also, I've saved at least $5 over the last decade from wear and tear on mice

load more comments (2 replies)
load more comments (6 replies)
load more comments (2 replies)
[–] [email protected] 16 points 1 year ago

Lets write an OS in Electron and go to March. Maybe start using the right tool for the right job. If i only know how to build with lego, I dont build a real house with lego, instead i learn how to do it right.

load more comments
view more: next ›