4 ms·
Is there ongoing work to reduce the memory footprint of Electron apps? I'm genuinely curious.
by brylie 7y ago
Is there ongoing work to reduce the memory footprint of Electron apps? I'm genuinely curious.
- rafaelvasco 7y agoI hope so;
- YesIndeedSir 7y agoYes - WebAssembly. It would hopefully kill the whole thing as an end game.
- _bxg1 7y agoIt really wouldn't. WebAssembly has nothing to do with the rendering engine, which is the bulk of Electron's footprint (and also the bulk of its apps' processing overhead). The latter can only be improved by Chromium devs (and is being improved constantly). The former requires that we come up with a way to share a single Chromium copy across apps. There's really no other way around it.
- martin1975 7y agoironically, java applets provided via the JVM a way to run multiplatform, perhaps not all applets off a single JVM - I don't remember exactly if each java applet used its own JVM, but it wouldn't be a radical departure to have the JVM run multiple applets, cross platform, which is the entire reason the JVM was invented. Now instead of the JVM, we've these rather beefy runtimes due to Chrome, Node.JS, Javascript (v8)... which if you look at it, do the same things applets did, except different. I think the problem w/cross platform is that we want to have everything look 'native' for the platform.. and when you demand that, hooking into the native APIs is sort of inevitable. Instead, I believe rendering probably ought to be done by the runtimes themselves, sort of like JVM did w/AWT/Swing..or like Dart is doing right now. There's always going to be a trade off when wanting to have a single app that runs cross platform and maintain a native look/feel to it... Quite frankly, I'm not sure which is best, but I lean more toward 'do your own rendering' and port the runtime to run across platforms, kind of like the JVM ...except w/Chromium/V8/Node.JS. Sure it hogs memory and its slow... but I think most devs will take that over having to develop multiple apps doing the same thing per platform.
- _bxg1 7y agoThe key differences between Electron and Applets are: 1) Java applets were awful to use in the browser 2) The DOM is the most advanced and flexible (and, yes, resource-hungry) UI layout system ever created. Seriously. Swing didn't come close in terms of the sheer breadth of possible interfaces one could create.
- martin1975 7y agowhat do you make of JavaFX then, which has improved on some of the points you speak of...?
- brylie 7y agoI have a, probably misguided, fear that We Assembly will inadvertently usher in an era of read only web, basically breaking the "view source" idea almost unique to the Web.
- weego 7y agoIt's going to be the next iteration of the "we could so we did" trend loop that drove Flash from a good tool to a ubiquitous disease
- laichzeit0 7y agoI hate to break it to you, but minification has broken this idea for years already.
- ddavis 7y agoIf you mean individual Electron apps.. wouldn't this require reducing the memory footprint of Chromium, not Electron? It seems many users hope to eventually see the ability to run multiple Electron apps on a single instance of Chromium.
- CharlesColeman 7y ago> Is there ongoing work to reduce the memory footprint of Electron apps? I'm genuinely curious. Isn't Electron basically Chrome, so the ball be in Chrome's court on that? That said, I really think that web development in general, including Electron needs a reboot. From my perspective as a user, everything seems to be full of bloat and memory leaks. Maybe some kind of redacted version of Javascript that's harder to screw up? If worse is better, lets at least try to refactor the worse crap we adopted to actually make it better.
- maxbrunsfeld 7y agoThe baseline memory footprint of Electron is already quite reasonable. See https://news.ycombinator.com/item?id=21347575 https://news.ycombinator.com/item?id=21347575