- cross-posted to:
- [email protected]
- cross-posted to:
- [email protected]
Remember that day when GDPR dropped and website suddenly started loading much faster.
Did my husband made this meme? Because he is constantly saying this 😂😂😂😂
Duh, it’s because more and more code is ran remotely. Wait…
Oh, they have new functionality. It’s all in the back end, detailing everything you do and sending it to the parent company so they can monetize your life.
Performance/optimisation wise is an environmental catastrophe…
Because companies give zero fucks. They will tell you they need tons of IT people, when in reality they want tons of underpaid programmers. They want stuff as fast and cheap as possible. What doesn’t cause immediate trouble is usually good enough. What can be patched up somehow is kept running, even when it only leads you further up the cliff you will fall off eventually.
Management is sometimes completely clueless. They rather hire twice as many people to keep some poorly developed app running, than to invest in a new, better developed app, that requires less maintenance and provides a better user experience. Zero risk tolerance and zero foresight.
It still generates money, you keep it running. Any means are fine.
Ironically the management that does have a clue often is hamstrung somewhere up the chain.
It’s all because of Electron, unnecessary libraries, and just bad coders. Asus Armoury Crate weighs a lot and is so slow, but it’s basically a simple app. Total Commander has much more features, but it’s fast, lightweight, and consumes 9 MB of RAM.
I’ve said this on reddit before, but once for a joke I tried to make a windows program to play doot.wav during October at random, and tried programming it on Linux.
Sinds playing audio and working with the system tray was tricky, I ended up with electron.
So yeah, an atrocious 120 mb application to play a 6kb wav file with a
Math.random()
. I don’t remember the memory consumption, but it was probably just as gross.Which faang company are you sr. engineer at?
Once I wrote an annoying program adding acceleration to the mouse cursor, so it was difficult to click any UI item. It was written in Object Pascal with Win API and weighted 16 KB. And I think in C it would be even smaller.
I remember there was a pretty funny prank program that would make the user’s mouse pointer leave behind little poops on the screen at random.
isn’t it a combination of younger developers not learning to programme under the restrictions of limited memory and cpu speed, on top of employers demanding code as soon as possible rather than code that is elegant or resource efficient or even slightly planned out
Mostly the latter. We don’t do any optimizations on our product whatsoever. Most important thing is to say yes to all the customers and add every single feature they want. Every sprint is spent adding and adding and adding to the code as much as we can and as quickly as we can. Not a single second is allotted to any discussion about performance or efficiency. Maybe when something breaks, but otherwise we keep piling on more crap at full speed non-stop. I have repeatedly been told “the fast way is the right way” followed by laughter. I was told to “merge this now” on multiple occasions even when I knew that the code was shit, and told the team as much. I am expected to write code now and think about it later.
As you can expect, the codebase is a bloated nightmare. Slow as shit, bugs galore, ugly inconsistent UI, ENORMOUS memory use, waaaaaay too frequent DB access with a shit ton of duplicate requests that are each rather inefficient themselves. It is a rather complex piece of lab management software, but not so complex that it should be struggling to run on dedicated servers with 8 gigs of RAM. Yet it does.
Much the latter.
Plus everything better work perfecly out of the box on any hardware, and there is a lot of different hardware. Compatibility layers are often built into the package.
Java, for instance, recommenda that you package the whole (albeit slimmed down) JVM inside the package for the target platform, rather than relying on the java runtime installed already.
The users arent expected to know any of that anymore.
yep, a lot of apps are just repackaged chrome running a web page.
which begs the question to companies that require use of the app instead of just having a working website i can use on my copy of chrome/firefox that’s already on my phone…
why do you need hardware access to my device?
1 reason is that they want as much data as possible. They sell the user data. Or they use the user data to improve their targeted advertising. They want more ad clicks.
Re app versus site, many know how to block ads on browsers. With an app, the firm is hoping they can show you ads. Ads can be removed from some apps but the layperson doesn’t know.
Generally maybe but for apps specifically, it’s the default choice of IDE, Android Studio, bundling tons of libraries for added functionality bound to Play Services.
Which would probably be illegal in EU now, if any judge had the tech see-through for it.
Most resources are not consumed by wonky code or dependencies. Most resources are consumed by images and sounds.
Surely it depends on the specific software.
Every decent piece of software has crap loads of resources: icons, texts, translations, manuals, sounds, fonts, etc. Even hello world app contains at least one resource - “hello world” string and what’s funny is that executable meta data required by operating systems and the string take more space than the actual code to print this string.
I imagine the ability for an app to watch me take a shit consumes about the same resources regardless of platform.
I’d argue that deploying from one codebase to 3+ different platforms is new functionality, although not for the end user per se.
I wish though that more of the web apps would come as no batteries included (by default or at least as a selectable option), i.e. use whatever webview is available on the system instead of shipping another one regardless of if you want it or not.
That’s how a bunch of apps broke when M$ got rid of explorer
But if your tool chain is worth anything the size of each binary shouldn’t be bigger. To oversimplify things a bit: it’s just #ifdefs and a proper tool chain.
In the web development world on the other hand everything was always awful. Every nodejs package has half the world as dependencies…
#include “the_entire_fucking_internet.h”
You know we’ve reached peak bloat and stupidity when JavaScript web apps have a compilation step, and I don’t mean JIT.
If the goal is to not have apps be too large, you probably don’t want to send the full variable and function names and all of the comments over the wire every time someone loads a webpage. That would be a very inefficient use of bandwidth, wouldn’t it?
Don’t we have compression built into http already?
I’d rather take a compile step than having no type safety in JS, even as a user.
Except… the compilation step doesn’t add type safety to JS.
As an aside, type safety hasn’t been something I truly miss in JS, despite how often it’s mentioned.
I think they are talking about typescript which is compiled into javascript
Ok, that could be true. I assumed they meant the “building” phase that some frameworks go through.
It’s just that we have to make space for our 5,358 partners and the telemetry data they need.
* legitimate telemetry data
Legitimate interest to train AI
Let me (lemme?) translate this into customer-friendly business language:
Enhanced user experience
That still wouldn’t account for it. The code to collect this is tiny and the data isn’t stored locally. The whole point is for them to suck it up into their massive dataset.
Fucking Chrome/Electron is why.
I honestly wouldn’t mind that if they could all use the exact same runtime so the apps could be a few MB each, but nooooo.
400mb iphone banking app entered the chat
See: Webview2
Unfortunately, it is extremely painful to work with😔 Enjoy rolling your own script versioning and update systems instead of using squirrel et al
Edit: I think Tauri works by targeting this and webkitgtk via their wrapper library, unfortunately I can’t get my coworkers to write rust
Isn’t that just the same pig, just wearing different makeup? I’m not a fan of msedgewebview2.exe allocating 500+ MB RAM just because Teams is open, but maybe that’s Teams fault…
Not quite. instead of a bundled pinned version of electron, it is an arbitrary version of edge’s WebKit fork shared across all programs using it. That means you don’t need to keep multiple copies of the webkit libraries loaded into memory.
That’s not to say that building things on web technology is an efficient use of resources. Even if multiple programs are sharing the webview2 library, they’re still dealing with the fundamental performance and memory problems caused by building an app in JavaScript.
As for why teams is so memory hungry? I would blame Teams.
Discord manages to make a half decent, highly responsive webview app, and that’s with the overhead of having its own separate instance of electron.
EDIT: the original poster was also talking about application binary size, not runtime memory consumption. Application binary size should actually be significantly helped by linking webview to instead of bundling electron.
Is there any alternatives to electron ? And why people’s doesn’t move on to alternatives if electron is huge & heavy resources ?
The alternative is “just serve it as a regular website”. It doesn’t need to be an app to do its job. Name a functionality which only exists in electron but not in the standard browser API.
I mean, Object Pascal was doing the “write once, run anywhere” thing decades ago. Java, too. The former, especially, can make very small programs with big features.
Java (and Object Pascal, I’m assuming) have very old-looking UIs. Discord’s gonna have trouble attracting users if their client looks like a billing system from 2005. Also, what do you do about the web client? Implement the UI once in HTML/CSS/JS, and again in JForms?
So if you’re picking one UI to make cross-platform, and you need a web client, do you pick JForms and make it work on the web? or React and make it work on desktop?
I think maybe you’re confused. Java drives a significant percentage of Android apps. It absolutely can do modern UI. I can almost guarantee you’ve interacted with a Java program this year that you never considered.
Pascal is more niche, but it can do modern, too.
Java was doing web clients before the web could and still can. I don’t know much about Delphi’s web stuff, but I know they’ve targeted it for years now.
WASM and transpiling blur the lines, too. LVGL can provide beautiful interfaces on the web as well as platforms Electron could never target, and works with any language compatible with the C ABI.
I’m not saying these strategies are without their own warts, but there are other ways to deliver good experiences across platforms with a ~single codebase in a smaller payload. But mostly nobody bothers because they just reach for Electron. It’s this era’s “nobody ever got fired for picking Intel”.
We need more people working with and on alternatives, not just for efficiency but also for the health of the software ecosystem. Google’s browser hegemony is feasting. Complexity has become their moat, preventing a fork from being viable without significant resources. Mozilla is off in a corner consuming itself in desperation.
A US-based company holds a monopoly over the free web and a hell of a lot of our non-web software. So maybe let’s look for ways to avoid feeding the beast, yes? And we can get more efficient software in the process.
Isn’t jfx still actually using HTML and CSS, though? like it’s cool that the UI logic is in Java, but doesn’t using CSS mean you still need to lug a rendering engine around, even if not a whole browser?
Yea, electron has flaws, but it’s basically the only way to make a truly cross platform native and web app. I would rather take a larger installed size and actually have apps that are available everywhere.
The sad truth is there aren’t enough developers to go around to make sleek native apps for every platform, so something that significantly frees dev time is a great real world solution for that.
Usually, instead of having 8-bit art, you have epic songs and very high definition textures. That is a good deal of why.
I think the epic songs and 4K textures are missing in my MS Office.
Yeah but they made xlookup, that’s worth a few hundred megabytes
All hail xlookup
That’s weird. Have you tried reinstalling?
Textures and songs are not a thing on most apps right? For android, using Kotlin has created much bigger appsize than old java
Kotlin doesn’t have much impact on binary size.
For smaller apps maybe. I’ve seen apps that should take less than 1mb rise to 15mb or so
That’s not due to kotlin.
Backed devs: sweats
It’s nearly all just using a whole library instead of the specific single function thats actually required, because few people are actually writing any code these days.