Hacker News new | ask | show | jobs
by andremendes 2708 days ago
Is it a good number for Electron apps? Is it ok nowadays? 150MB seems too much for me. I also thought that by using Electron an app would be readily portable but I could only find Mac binaries.
1 comments

150MB is really good for an Electron app
Oh my God I thought he was kidding. How did it get to this? And how do we solve this?...
Electron is one of the reasons apps like this even gets made in the first place, other options are often not worth the time of development.

A solution to reduce the size could be to ship the Electron runtime similar to .NET, etc.

However, PWA's are probably going to be the best bet going forward.

Could something like Android webview work? The webview doesn't force each app to include a whole browser. So, maybe single instance of electron runtime with multiple thin apps with "electron-webviews".
Don't use Electron apps?
How did it get go this?

Well that's what you get when the "solution" is to embed a webserver, a browser, a native executable to show that browser, and the server runs Node...

The solution is simple, stop shoving square pegs in round holes, and learn an appropriate language rather than shoehorn JS everywhere.

> learn an appropriate language rather than shoehorn JS everywhere.

Being that this app's sole purpose is to evaluate JS, this may be a situation where JS isn't being shoehorned

By the looks of it, only the console (Or equivalent) is used for output, so bundling an entire browser seems way overkill for the output.

There's plenty of ide-libraries in other languages to replace the one used by runjs.

You'd still have to bundle a JS engine. Presumably you could build a traditional UI app and include V8, but I still think this isn't a bad use case for Electron (but I agree there are many apps where it isn't the best choice)
yep - that's pretty minimal - about what I get when I'm just starting off with a skeletal electron app.

for refernce, on win 10: whatsapp - 200+mb and 4 processes. slack - 325mb and 5 processes.