Hacker News new | ask | show | jobs
by sm4sp 3231 days ago
For someone who uses Draw.io a whole lot at work this is great news

Since it's an electron app, I suspect there's going to be the flak about the memory usage.

But at the end of the day, these electron apps are fulfilling the need of users who enjoy desktop experiences of their essential web apps

2 comments

We're looking at about 60MB on macOS for a small diagram. Another thread reports Win asking for 175MB.

But as you say, it was electron or nothing for us, no way we can justify native apps.

Using ~110MB for me on Windows. Considering you can get 8GB of RAM for ~£54[0], running this application is costing me roughly 61p worth of RAM when open. Or, looking at it a different way, on a modest system I can run 720 versions of this program.

Honestly in an age where memory is so cheap I'd much rather have an Electron app for every conceivable thing (which take a fraction of the time to create) as opposed to fully fledged applications that only do a few things.

E: Having the tab open in Chrome appears to use more memory for me[0], perhaps because of the extensions I use?

[0] https://www.amazon.co.uk/HyperX-FURY-DDR3-Memory-Module/dp/B...

[1] https://puu.sh/xbNzL/503e54735e.png

On mobile, memory _may_ not be _that_ cheap if you look at what you pay for it in power requirements.

Exact data is hard to find, but, for example, http://www.buildcomputers.net/power-consumption-of-pc-compon... claims 2 to 3 watt per stick. That seems very little compared to CPU, video card or backlight, but your RAM more or less uses that _continuously_. Power usage doesn't go down if you don't use your laptop/tablet/phone, or don't use part of the memory (this may be an area where innovation is possible). So, power drain while your laptop/tablet/phone isn't is used may be dominated by RAM power requirements.

As I said: hard data is difficult to find, so I don't know how big this effect is. I think power usage is an important reason why Apple keeps the amount of RAM in their tablets and phones fairly low, though.

Every time electron apps come up, I bring up slack. It's currently using 1.3GB on my machine. I've got Spotify open too, with another 800MB. Adding another 8GB is easy at the lower levels, but I've got 32GB of ram in this machine, and regularly have to kill slack and spotify when compiling to get back 2-3GB.
Does anyone know if there are any lightweight alternatives to Electron in the works? Or if such an idea even makes sense?
It does make sense, not a lot of people seem to be interested though - https://github.com/pojala/electrino
There are a few options.

http://alternativeto.net/software/electron/

One thing about these is that Electron can be optimized. I believe that one of the Visual Studio tools uses it and has dramatically lower memory than slack. Slack just doesn't try to improve performance.

Like to see Alternatives to electron as well - even super optimized electron on code Atom and Google Chrome are quite heavy on a MacBook Air
I remember XULrunner was fine like 15 years ago on a Pentium II. A lot less features and performance tho.
If you don't mind doing your UI in canvas (maybe with react-canvas) then these two look interesting, although Nidium doesn't seem to support desktop anymore. https://www.nidium.com/ http://impactjs.com/ejecta
Also, any election alternatives for desktop that specifically don't use a browser DOM? Something like react native for Linux/osx/windows or QT.
There is Brig (https://github.com/BrigJS/brig) but despite the fact that QML and JavaScript are already "married", and the immense popularity of both Qt and JS, it's far, far, away from Electron's maturity.
Slack and Spotify lack critical optimizations. They appear to leak long term objects like crazy.

This isn't Electron's fault. I have plenty Java apps just as guilty.

I do wish Slack was a better case for Electron. JavaScript isn't immune from leaky bad patterns, just the same as other langs/environments.

Slack Spotify an electron apps are not only memory hoggsThey also heat up the Mac so much
Price isn't the only issue; speed has to be considered as well. If you have a program, and it only uses a small amount of memory, it'll fit into the cache and run fast. If you have a program that uses many times more memory than the cache can hold, it'll run slow. No matter how cheap RAM is, the cache is still going to be fixed to a small size.
For what it's worth, I'm completely fine with this. 16GB of RAM is inexpensive now and given the number of apps I have running at a time 0.25GB or so doesn't make any difference.

> it was electron or nothing for us

People forget this when demanding native versions. Creating multiple native apps is not free.

This really heats up my Mac

is there a native cocoa app that does latex diagrams