3 ms·
The author doesn't even understand what's wrong with large binaries and writes nonsence about Internet connection speed. Main problem is that statically built l
by codedokode 7y ago
The author doesn't even understand what's wrong with large binaries and writes nonsence about Internet connection speed. Main problem is that statically built libraries are not shareable. For example, if you have two Electron applications, each with its own copy of Chrome, then every Chrome will take about 100 Mb only for code section (not counting data, stack which typically will be much larger) and together they take 200 Mb. But if those applications didn't ship their own copy of Chrome and used the same libraries then the code would be shared and took only 100 Mb of RAM. That is, 100 millions of bytes of RAM are saved.
The more RAM such applications take, the higher is probability that the system will get out of RAM and start swapping. And in this case the system will become so slow that it won't matter what kind of Internet connection you have.
The problem of non-shareable code is also actual for interpreted languages like Javascript, Python or Java. When running such applications, their code and byte-code generated from it often are not shareable. So if you run two copies of desktop JS application, that uses some JS library, you can get two copies of this library in memory. As I remember, Android uses some clever trick that allows sharing compiled Java code. Most other interpreted languages cannot do it.
Also, a fun fact: if you are using Gnome-shell on Wayland and the system starts swapping, computer can stop responding even to mouse movement, and you won't be able even to switch to other VT.
- monocasa 7y agoBut part of the point of electron is a fixed base that you control. You only have to validate against one specific version of electron. Forcing people to use the same electron is directly against part of the value proposition to using it in the first place. Like, I say this as someone who hates the electron-ification of the desktop. Additionally there's some pretty good arguments when you're not in a dual interpreted/compiled world and can LTO fully like a pure Rust app is, that the benefits of having everything shared between processes are outweighed by stripping everything out that isn't necessary.