News for hackers. Stuff that matters.
Re:Electron 1.0 is here by ksec on Wednesday May 11, 2016 @04:52AM (#11673618)
I know this is not really electron's fault, but could there be way to shrink these run times to a lot smaller?

Like Whatsapp App on Desktop you literally have a 60MB download and 200MB install just for a screen that is EXACTLY the same as the Web Version of Whatsapp.

While I dont expect all the apps are like CCleaner or the old uTorrent which is only a few MB in size, 200MB is just redicously large.

Re:Electron 1.0 is here by crucialfelix on Wednesday May 11, 2016 @05:31AM (#11673814)
Usually people copy most of the node_modules over.

Ideally it should be run through webpack/etc and only a bundled, minimized version of the app is shipped. In practice some modules may have native compiled addons.

I'm working on an app right now and it ships at 247MB which is way too big.

release/darwin-x64/PlaySPLOM-darwin-x64/PlaySPLOM.app/Contents

107M ./Frameworks

12K ./MacOS

81M ./Resources

52M ./Resources/app/node_modules

Re:Electron 1.0 is here by crucialfelix on Wednesday May 11, 2016 @10:11AM (#11675405)
related: I realized that many people including myself made mistakes with .npmignore and accidentally include docs directories. that is a lot of bloat.

a node module should be just runtime required code and LICENSE

Re:Electron 1.0 is here by justncase80 on Thursday May 12, 2016 @11:39AM (#11684192)
^ This. Setup your .npmignore before publishing!

Also, before packaging your Electron app use something like gulp to exclude problematic files like .md and anything else unnecessary.

There are other common tools like browserify that can still be leveraged.

Re:Electron 1.0 is here by marcosscriven on Wednesday May 11, 2016 @04:54AM (#11673628)
Not trolling, but do you find 200MB is actually a burden? Here in London cable or fibre links means that downloads in seconds.

EDIT - Ok, sorry, it seems quite a few people do have pretty horrendous bandwidth issues.

Re:Electron 1.0 is here by 1123581321 on Wednesday May 11, 2016 @05:32AM (#11673822)
Other people have covered the bandwidth angle, but I also think the size itself is an issue because of memory. And the more Electron can load into memory out-of-the-box or via default coding conventions, the more opportunities for poor memory management from developers. Since Electron is being used for utility apps, its bloat multiplies on a system with a lot of apps on it.

Also, Electron's size means more power draw. When I want enough battery life to do some work and still watch a long video afterwards, I habitually close Slack because it makes a worthwhile energy difference. The app's size reduces my engagement with the app after install. I'm aware my behavior is unusual, but developers do need to keep this in mind, especially as Windows and OSX make app energy use more transparent.

Re:Electron 1.0 is here by marcosscriven on Wednesday May 11, 2016 @05:57AM (#11673928)
Not trying to defend Electron or larger app frameworks here, just trying to learn.

How do you make the link between app size and power draw (as opposed to some other aspect of Electron causing draw)? And, what are you comparing Electron's power draw to?

Re:Electron 1.0 is here by dspillett on Wednesday May 11, 2016 @08:39AM (#11674683)
It might be a stretch to assume the effect will be significant, but...

A larger application presumably uses more RAM to itself (especially if its instances of node/chrome/libraries are distinct and so do not share pages by reference or in a copy-on-write manner with other similar applications) so there is less room for cache and buffers so the machine as a while is likely to be hitting disk more often and so consuming more power that way.

Loading the app will obviously involve more IO too, though hopefully that is not a regular occurrence for a full desktop app (it may be for a smaller utility program though) so the running costs should dwarf any start-up costs over time.

Re:Electron 1.0 is here by keeperofdakeys on Wednesday May 11, 2016 @05:15AM (#11673735)
Personally I think frameworks like Electron lead to huge bloat in terms of download size, disk space, and system ram. However there is no doubt that it increases the accessibility of developing applications for multiple platforms.

I think the following is a great narrative on why it can matter though: http://blog.chriszacharias.com/page-weight-matters

Re:Electron 1.0 is here by marcosscriven on Wednesday May 11, 2016 @05:27AM (#11673790)
Does download size necessarily mean more system ram usage?

I agree on page weight, but somehow I'm more sympathetic to downloading apps, perhaps because it's just downloading in the background, rather than me waiting to read the content.

Re:Electron 1.0 is here by keeperofdakeys on Wednesday May 11, 2016 @05:47AM (#11673884)
From what I understand, each instance of an electron app essentially needs its own copy of the electron framework to work (which includes a web renderer, and javascript engine). So we're talking at least 50MB per instance, for applications which may have been 10MB if written in a native language. When you start running many applications, it can certainly add up. Users do notice this kind of stuff, they are just too adaptive to bad user experiences.

As for downloads, I remember using dialup and only getting one 1MB file per hour. It would take a lot of patience to even download a 10MB app on that. I don't tend to leave my computer on downloading overnight these days though, and I 'only' get 1MB/s (dslreports.com says I'm "faster download than 60% on DSL in australia").

Re:Electron 1.0 is here by drivebyops on Wednesday May 11, 2016 @05:49AM (#11673890)
I have found these nodejs desktop apps to use less RAM than other more traditional Toolkits like Qt. I can live with more disk space being used if it means better memory usage
Re:Electron 1.0 is here by blub on Wednesday May 11, 2016 @06:13AM (#11673991)
Extraordinary claims such as these need at least some sort of evidence. It does not make sense intuitively that a browser engine has a lower memory footprint.
Re:Electron 1.0 is here by keeperofdakeys on Wednesday May 11, 2016 @06:16AM (#11674003)
It could be that it's the other programs that are also bloated.
Re:Electron 1.0 is here by keeperofdakeys on Wednesday May 11, 2016 @05:57AM (#11673930)
That's good news. I did some searching to find some real comparisons, but most of the links I found were related to memory leaks (nothing from 2016 though, perhaps outdated).
Re:Electron 1.0 is here by e12e on Wednesday May 11, 2016 @05:11AM (#11673709)
There is a point when convenience for lazy developers becomes bloat. Emacs is probably at that point - a runtime feature-full enough that you can get both a web browser, mail/news reader, presumably an irc client as well as a half-decent editor in a few tens of megabytes. Significantly more than a small talk runtime, that fits it's own blitter, dcvs and full IDE in under 10 MB.

What does the order of magnitude really gain the end user? A slower, less powerful GUI system?

Re:Electron 1.0 is here by slowmotiony on Wednesday May 11, 2016 @04:59AM (#11673650)
Not trolling, but do you realize that not every human lives in a major European city connected to a fiber link?
Re:Electron 1.0 is here by TeMPOraL on Wednesday May 11, 2016 @06:58AM (#11674152)
Last time I was in London, company headquaters had worse connection than my old home one in Poland. Generally whenever I went for business purposes, I was always surprised how slow business connections were...
Re:Electron 1.0 is here by marcosscriven on Wednesday May 11, 2016 @05:04AM (#11673670)
Of course :) I lived in Sydney for a year, but even there I had a 24Mbit ADSL2+ line, which is still under a minute to download this.
Re:Electron 1.0 is here by oblio on Wednesday May 11, 2016 @08:25AM (#11674589)
You were comparing London (huge metropolis) with Sydney (another huge metropolis).

Those data points aren't really as different as you seem to think :)

Re:Electron 1.0 is here by marcosscriven on Wednesday May 11, 2016 @01:16PM (#11677178)
Sydney certainly didn't seem like a 'metropolis' when I was there :) But seriously, Australia in general has poor internet bandwidth, by dint of its limited transoceanic cables, so I thought it was a fair comparison!
Re:Electron 1.0 is here by venamresm__ on Wednesday May 11, 2016 @05:13AM (#11673718)
200MB takes around 1hour to download where I'm living.
Re:Electron 1.0 is here by marcosscriven on Wednesday May 11, 2016 @05:12AM (#11673712)
I don't think people believed I wasn't trolling. Sorry.
Re:Electron 1.0 is here by threatofrain on Wednesday May 11, 2016 @05:43AM (#11673869)
I don't think download speed is that much of an issue, whether or not you have good internet service, because I think people are willing to wait a little to download an app. The issue is more app size on modern computers that come with limited size SSD's and steep upgrade tiers.
Re:Electron 1.0 is here by abritishguy on Wednesday May 11, 2016 @05:07AM (#11673682)
Not everyone has a fibre connection. I get 250KB/s at home.
Re:Electron 1.0 is here by andrewingram on Wednesday May 11, 2016 @05:10AM (#11673700)
My parents, who live in a village in the English countryside, get similar speeds, and a 5gb monthly cap.
Re:Electron 1.0 is here by marcosscriven on Wednesday May 11, 2016 @05:11AM (#11673705)
Woah - I know many don't have fibre/cable, but I thought at least ~20Mbit speeds were the majority. Where are you may I ask? Is that common where you live? Is it costly?
Re:Electron 1.0 is here by faizmokhtar on Wednesday May 11, 2016 @05:40AM (#11673855)
It's pretty common in some major part of of Asia. It does get costly from where I am (Malaysia).

http://www.statista.com/statistics/381388/asia-average-inter...

Re:Electron 1.0 is here by merb on Wednesday May 11, 2016 @05:36PM (#11679528)
Actually 20Mbit/s is a lot even in germany... More likely to see 6 Mbit-16Mbit while some cities have 25/50/100 but if you are living outside of bigger cities (which most people do) you will end up between 6 Mbit-16Mbit and some area's are worse.
Re:Electron 1.0 is here by lewiseason on Wednesday May 11, 2016 @08:12AM (#11674502)
Very common in "rural" UK, where rural means 5 miles away from a city. You'd expect to pay £20-25 per month for the privilege (although note that this includes a "line rental" charge paid to the layer 1 provider - BT - of approx £15 per month)
Re:Electron 1.0 is here by andrepd on Wednesday May 11, 2016 @09:24AM (#11675001)
200MB is my 4g data allowance for 1 month. Yes, for 95% of use cases 200MB is an unnecessarily large burden.
Re:Electron 1.0 is here by edko on Wednesday May 11, 2016 @11:03AM (#11675956)
If your app becomes successful, and you host it on a CDN, 200MB will consume a lot of bandwidth, creating costs that may prevent you from distributing it for free.
Re:Electron 1.0 is here by myrmi on Wednesday May 11, 2016 @05:18AM (#11673750)
I live in zone 2 in London, and the fastest broadband I can get is ~2Mbit. Even in major cities, good - or I would argue, even acceptable - broadband is not ubiquitous.
Re:Electron 1.0 is here by marcosscriven on Wednesday May 11, 2016 @05:20AM (#11673756)
So do I (in fact, on the cusp of zone 3) - so I'm really curious why that's the fastest you can get?
Re:Electron 1.0 is here by asherkin on Wednesday May 11, 2016 @06:28AM (#11674051)
Not the OP, but in the same situation until I moved: Close-ish to an exchange (so no street cabinet on the line for fibre equipment), no cable coverage (so Virgin is out), out of range of wherever the hell Relish's tower is, and ancient wiring in a block of flats (so can't reach sane ADSL speeds).
Re:Electron 1.0 is here by cannam on Wednesday May 11, 2016 @06:42AM (#11674104)
I'm in the same position. BT recently declared that they might install fibre to my street some time in 2017 though, so that's quite exciting.
Re:Electron 1.0 is here by banach2 on Wednesday May 11, 2016 @11:48AM (#11676367)
BT declared that they would install fibre to my street in London five years ago. That didn't happen.
Re:Electron 1.0 is here by flamethroeaway on Wednesday May 11, 2016 @07:28AM (#11674268)
200MB is how much space eclipse takes up