4 ms·
Why doesn't Electron debundle itself into the Runtime vs Application? Much like .Net Runtime. Electron can then be installed in a single spot in the system and
by pookeh 6y ago
Why doesn't Electron debundle itself into the Runtime vs Application? Much like .Net Runtime. Electron can then be installed in a single spot in the system and all Electron apps pick it up from that spot. You can install bundle the Electron Runtime in the installer (200mb installer is no biggie for a desktop app) but you get all the benefits of consolidating RAM usage across.
- spijdar 6y agoWell, the .Net runtime isn't exactly the most successful story from an end user perspective, where you occasionally run into weird problems with mismatched runtimes or missing runtimes or similar. Granted, it's not that often, but it feels like a lot of apps relying on it just ship their own copies of the runtime. Still saves resources if multiple apps use the same runtime version, but...
- neeleshs 6y agoIf the installer could do this instead.. Check if the app is supported by an existing runtime, if not download it and make it available globally, otherwise use the current runtime and download only the app
- edflsafoiewq 6y agoIt already is. For example, on Arch Linux, Electron is packaged as a separate binary and the eg. VS Code binary is just a shell script that points electron to the right entrypoint #!/bin/bash ELECTRON_RUN_AS_NODE=1 exec electron9 /usr/lib/code/out/cli.js /usr/lib/code/code.js "$@" But most Electron apps prefer to bundle the whole runtime with their app.
- ziftface 6y agoThat's an interesting point, especially since V8 is already used for running multiple applications that need to be sandboxed from each other. It would probably be a big effort though, and to get any real benefit from it, applications would actually have to start switching to a different fork of electron. But I often have multiple electron applications running at once so this would be pretty nice.
- mhaberl 6y agoArgument against debundling is that runtime update could break your app in some way. Sure, there are apps that get updated regularly, but not of all of them are like that, for example some company could implement some internal tool that doesnt have to get updated for years and runtime updates would present a risk with no benefit.
- rtkwe 6y agoIt's a simpler experience to just dl the app and install it when it's bundled and less chance of something odd breaking your app for your users. Unbundled you wind up with either a Java situation where you have to get your users to install a particular runtime because you built with a particular one or a MS runtime where every app comes bundled with it's own copy to make sure you have the right one so there's not that big of a savings.