My poor RAM...
My poor RAM...
My poor RAM...
I love having multiple copies of Chromium installed on my system at the same time. 250 MB internet messengers please!
You ever notice how everything installs and uninstalls super cleanly and easily these days and software gets consistent regular updates?
That's because developers stopped min/maxing storage and started bundling all of an application's dependencies with it instead of trying to rely on globally installed packages and frameworks that can break or be missing or lead to dependency hell.
No one likes larger download sizes and more storage being used but the tradeoff is by and large worth it.
Isn't this about performance and not storage?
Making and managing an electron app is easier, but it is possible (with more work) to have clean install/uninstall, a nice UI, and consistent regular updates while still being fast and efficient.
Better programs will always need more work to create.
I am curious about what other options there are, and why Electron is what a lot of people go with.
You ever notice how everything installs and uninstalls super cleanly and easily these days and software gets consistent regular updates?
Not really. Well maybe I take it for granted having switched to Linux.
I mostly hate Electron for the dumb RAM usage.
Pretty sure that's more about a switch from physical distribution where storage is expensive (CDs) to digital where it's cheap.
250 MB internet messengers please
Hum... Make them some of those large-sized megabytes if it's Teams.
Teams is truly exceptional, more so because the same company has VSCode.
Both show the inherent lag and sluggishness of Electron apps, but they're on totally opposite ends of the spectrum. Which is wild. It's like a case study or something.
Well, Telegram uses 690 MiB on my system and Thunderbird uses 1.1 GiB.
Wouldn't it be great if there was a way for all these electron apps to share the same runtime so people don't have to bundle it with their applications.
You know, I bet if the applications without the runtime are small enough, you could probably stream them directly from the internet without even downloading anything up front!
I guess that shared runtime would need some way to browse the applications....
^(vscode gets a pass)
Use the system webview, you cowards!
Developers bundle all of Chromium, because they're afraid the OS webview will have a different browser engine. Testing is too hard…
This is such a terrible excuse — usually the same app runs in browsers too, so it already has to deal with even wider variety of browser engines.
Tauri moment
I will say that unless something's changed in Windows recently, the win32 API webview is still a vestigial version of internet explorer due to Microsoft's obsession with non breaking changes (not saying that's a bad thing)
Given I lived through those years as an engineer, I completely understand people wanting to avoid that particular ancient eldritch horror.
Edit: apparently there's webview2 now based on edge (and therefore chromium), I take it all back
I mean even for something like .NET, apps install the version of the runtime they need in a shared space, so that they can be used by everyone desiring that specific version.
You mean instead of downloading the app, we could just browse through them? That's a revolutionary concept. We could call them hyper-apps!
Outside of PWA shortcomings, I believe there's a way to have a .NET application run a WebView with Edge (Chromium). I believe Windows 11 has both pre-installed now.
I don't even want to run NodeJS anymore. I would run all my server apps on headless Chromium if I could.
Don't bundle your app, let the CDNs do their job. God damn, that's revolutionary.
Hopefully your idea takes off like the idiot that started the "monorepos" craze.
To your credit, your idea is actually good.
You’d better be talking about code oss
We live in a timeline where desktop apps all run in a browser, whereas mobile websites are all their own apps.
mobile websites are all their own apps
Yeah, written in react native :D
The argument is better if the app is written with Ionic.
For now at least, PWAs work on Android and I believe many apps already use electron or something similar under the hood
When I worked support for an android device manufacturer I had some strange issues with other apps that were resolved by clearing the cache in Chrome. Its all webpages all the way up and down baby!
It seems every new shiny technology today tries its darndest to short-circuit 40+ years of advances in OS virtual memory design. Between Electron and Docker, the entire idea of loading an image into memory once and sharing its pages among hundreds of processes is basically dead. But at least there's lower support burden!!!1111
Docker is just a lightweight container that has the app and OS all in one package. It uses the underlying kernel of the host system. No where near the same as electron apps.
Except each container has its own libc and any other dependencies. If any linked binary or library has a different inode, it gets loaded separately. I would say it is indeed quite similar, even if the images in question here aren't hundreds of megabytes in size like with Electron.
Still the same issue of a still pretty big overhead that is unnecessary in the vast majority of situations.
At my current workpalce, ~20% of hardware goes to docker. Is it still worth it? For the company it is I assume, since we can let developers with fuck all operations experience deploy stuff without bricking our servers. But we could also be hiring operations people who know how to run applications on servers without fucking them up, but of course in a money game docker wins out for ease and speed.
Importantly, comparing stuff like Electron though, we can scale up the hardware and that's included in the cost of running docker. Desktop users stuck with shit like VSCode, Beekeeper or Mongo Compass can't realistically do that though, PC upgrades aren't something you do in 10 minutes and even then your options are limited.
So for companies and servers, docker makes a lot of sense. Especially on the business side. For a private end user, these virtualization tools remove the potential performance all that fancy hardware nowadays could provide. And in the case of Electron shit, they also make for a worse inconsistent UI and laggy interactions.
Because everyone is a developer now. Like English majors who never took an Operating Systems design class.
Preach it.
World Wide Web was not intended to be an app framework.
What else works across as many platforms and screen sizes as well as the combination of HTML/CSS/JS?
Most attempts to build that just lead to a worse version of it.
I'll be the first to admit it's bloated to all hell after 25 years of people stacking crap on top of more crap, and it's perilously close to being completely controlled by Google, but it is what it is.
What else works across as many platforms and screen sizes as well as the combination of HTML/CSS/JS?
Doom. It runs on every-fucking-thing
Maybe I do not specify clearly what I mean.
Why to order taxi, access bank, register a domain name do we have to have apps on all platforms and then to fix this problem we bloat the web by creating webapps. Why not just plain simple HTML website beautified with CSS instead?
Real cross-platform apps are those written in, for example QT. Then came Android and iOS forcing everyone to use their toolkits so we started to abuse poor web.
I HATE ELECTRON I HATE ELECTRON I HATE ELEC
Electron? More like cringetron
Have you tried making a desktop application?
yes. i used eframe/egui in rust, which builds to native. not saying its the best framework, but def better than el*ctron
Web pages aside this is what Microsoft does with their pre installs on Windows
Electron is awesome, badly coded apps just suck. Look at Voyager for Lemmy, it's great and it's just a web app.
Electron apps are nice in some ways, but use a ton of memory
I usually don't mind electron apps too much, but I do prefer native apps
Voyager is made with Ionic. The difference with Electron is that in Ionic, trough Swift/Kotlin, shows a WebView from the System Browser (mobile only) while Electron “installs” Chrome each time (desktop only).
WebApps are great, but Electron is just too much
No, it's not nice. Looks good only on Windows where everything have unmaching look anyway.
Lmao, need more title bars to match macOS' 90s aesthetic?
Uh huh. Electron apps look good on Windows. Sure.
No electron app ever looks good anywhere. They are consistent insofar that they look shit on all OS, equally. And alias their fonts wrong. And scale them wrong. And break accessibility.
At this point JavaScript is Java. Write once, deploy everywhere.
If I have to load elements from the web just to use the electron app properly, I’d rather use a web app and load the whole page each time and not have the tracking.
And no, my fellow PHP devs, “Native” PHP's also not it!
Folks in this thread complaining about Electron I think miss the point. It is a trade-off. It is designed to allow engineers who have a web dev skillset to write desktop apps. For those like me who want to write the occasional hobby app - it's great. It's also great for orgs to be able to have cross functional teams. Just like React Native allows this for the mobile world. This could be because they're small and can't afford specialist native engineers for each platform they want to support - or it could be that they want to spend their money in other areas and happy to trade off app performance. If it was as lean or as performant as native apps there would be a lot of people in this thread looking for work.
Electron is just the "easiest, most common option", because things like TauriJS and NeutralinoJS exist, which do what electron does without having to bundle a whole-ass Chrome browser.
It's not terrible, electron is good for stuff like what you discuss
I just like native apps better haha
Native apps have the potential to be better than electron apps for sure. I get that.
This is a surface level thing though - the question is: would THIS app, written by THAT organisation be better if it was native? Unlikely because they don't have the skillset for it...otherwise it would have been a native app. Its also likely that less apps would even exist because the barrier to entry is higher without electron and similar.
But this is just a meme and I'm taking this way too seriously!
It's still terrible because of its ram usage, electron uses minimum 300Mb per instance so that's 3GB for 10 apps while if you open them all in Chrome you save 100s of mb
Chrome won't give Web apps access to the file system amongst other things. I'm a firm proponent of web apps - but they can't do everything a desktop app can, and so electron offers an alternative with the trade offs I mentioned.
That's why I got 32GB ram when I upgrade my PC. I don't give a fuck to how many ram they use now.
This is the same coping mechanism as "just build another 4 lane highway. That should solve the traffic issues". You are just shifting the problem.
I'm not shifting the problem if I have actually paid the money to build the 4 lane highway.
I got 32 on my desktop so I'm fine there, but my laptop explodes if I try to run the same amount of stuff with 8GB ram
dies in 4GB RAM*
Easy solution, get a laptop with 32 GB RAM/s
Seriously though, the problem is either on both or on neither. It's an additional expense on the customer though, like everything else nowadays. I personally ended up getting a super powered laptop/tablet and relying on it for all my computing needs because laptops are good enough for most use cases nowadays and desktops are limited to specific use cases.
Thinking about it though, the reason it's only limited tasks needing more power might be because everything else is electron.
Wait until Tauri will gain popularity.
Yeah, then we can have marginally more responsive web apps.
Seriously though, web apps are usually just optimized like shit in addition to using chrome.
Do you know what this even is? It's not marginal at all. Check the comparisons of Tauri and Electron. And it does not use Chrome. Electron also doesn't use Chrome.
I was pleasantly surprised to find a tauri app in the wild at my work. Our time tracking software uses it, at least for the Linux version.
Well, people tend to pick the easiest way to achieve an objective, even though the solution is not simple nor optimised.
Tja in a world where every OS has its own stupid little UI system, language and IDE..
What does Tja mean?
no idea if this is right or not, but lol
Dutch people use it (although I doubt it's an official word), meaning something like "that's what you get" or "oh well".
That's why I use discord in a separate FF instance and spotify-tui with spotifyd
Audio chat is "not supported" by discord in Firefox last I checked. Are you spoofing user agent also?
It works for me.
I did originally have some issues and did some searching that there used to be firefox issues that are now resolved. Mine were fixed by restarting my VPN, but otherwise no problems.
Damn, I didn't even think about running Discord in a separate FF instance like that. Been looking for a more privacy focused approach then installing from the .deb. Thanks man!
I use a separate FF profile. It has no addons, apart from Vencord and a custom userChrome.css to hide the top tab bar (as full screening it would obstruct swaybar). I then just made an xdg .desktop entry which opens canary.discord.com with firefox using that profile.
Overall it somehow uses less RAM (albeit with another FF instance open, so maybe some resources are shared) than the official App and all other forks (eg. custom electron version) I looked at. Nearly everything works, but:
Overall all of those problems are a better alternative to the constant flickering that happened with all electron apps on my system if they are not interacted with for a few minutes (eg. by being on another monitor/workspace). That's just distracting as hell and often even breaks functionality. And of course, Nvidia is at fault again. Like for 90% of other problems with my system.
::: spoiler
Little rant: Some issues that happen on my Nvidia system (wayland) that are not present on my Dell Laptop w/ Intel HD graphics. I spent hours and days researching those Problems with potential solutions, very few improved some things a bit.
Sadly the audio quality sucks for discord web for me on Linux. Maybe because there's either little or no audio processing unlike in the desktop app with krisp or whatever
We use flutter and the app on iOS and Android look great. The web version looks and works like shit though