3 ms·
I'm currently developing a web app and while my nw.js/electron version is around 50 MB and uses 200+ MB of memory, loading it in Firefox it's a 600kB bundle, fu
by z3t4 8y ago
I'm currently developing a web app and while my nw.js/electron version is around 50 MB and uses 200+ MB of memory, loading it in Firefox it's a 600kB bundle, fully renders in less then half a second, and uses a whopping 8 MB of memory in Firefox. Actually less the HN! So while I think this project is cool, if you consider using it, also consider making a in browser web app. Also remember that the browser is more then just a HTML renderer. You have stuff like speech recognition, text-to-speech, user input, sound api, 2d/3d api, support for a bunch of mobile sensors like accelerometer, etc.
- WhitneyLand 8y agoThe extra memory usage of electron is a shame. When you say consider using an “in browser” web app what do you mean by that precisely? Do you mean consider if you can get by using browser based offline/local capabilities and not go outside the sandbox? See my other comment on rebuilding FF, not sure if you meant anything overlapping.
- z3t4 8y agoYou would have to run non-sandboxed features via a server, which can run on the user machine! Chrome, Firefox, Opera, IE, Edge supports starting the browser in "chrome"-less or "app" mode, so the program will feel native. You could also run the server part in the cloud! And use "add to desktop" to get the "chrome"-less mode which is currently supported on Chrome and Firefox on Android. Or just run the app in a browser tab :)
- roryisok 8y agoI think you're failing to include the firefox memory usage in that second example. the 200+MB memory of electron is because it includes the browser. Your 8MB file also needs firefox to run, so in a naked desktop environment the user first has to spin up 170MB+ of firefox before they can run your 8MB app.
- z3t4 8y agoBut you do not need to have five full Firefox's running for using five web-app's. Another benefit of web apps, is that with some effort it can run everywhere, where as an app container like electron needs to have separate builds for each platform.
- roryisok 8y agoAgreed that's definitely a drawback. Mozilla had an experimental project called qbrt that was like electron but used the locally installed Firefox, exactly like you're describing. Hasn't been updated in quite a while though