I just had to download 108MB for a new version of Signal on Ubuntu. This is a major headache since I am only on LTE.
I investigated a little ("dpkg -L signal-desktop") which led me to /opt/Signal. Checking directory sizes there with "for i in *; do du -s -- "$i"; done | sort -n" gave 177MB in the resources folder. The biggest file there is app.asar with 104MB. Extracting files from there ("snap install --classic asar; asar extract app.asar ~/tmp") and running the du script again led to node_modules/ringrtc/build. The directory listing there is:
darwin linux win32
"file win32/libringrtc.node" shows
libringrtc.node: PE32+ executable (DLL) (GUI) x86-64, for MS Windows
So my question is:
Is it really necessary to include libraries from foreign operating systems in a deb package?
And my suggestion:
PLEASE strip those libraries! Or hammer on the electron developers to make it possible to strip those!!
Thank you!
Thanks for opening this issue. I've renamed the title to be a little more descriptive, I think. I've also filed this as a feature request.
Download size for Windows is currently 114 MB (signal-desktop-win-1.37.3.exe), which also seems much too large for a messaging app.
Mac download is 140 Mib. Why is this app so large for sending/receiving messages?
@AnthumChris , because Signal is an Electron app. Having an Electron app saves the developers from having to worry about differences between Windows/Linux/Macos. Electron uses Chromium engine (the same Engine which Google's Chrome browser uses). Esentially you are downloading the whole browser. The price of that convenience is the size of file you are witnessing. But it makes the developer's life so much easier.
examples of big files inside the package
> du -sh /usr/lib/signal-desktop/resources/*app.asar.unpacked/node_modules/ringrtc/build/*
112M /usr/lib/signal-desktop/signal-desktop
104M /usr/lib/signal-desktop/resources/app.asar
12M /usr/lib/signal-desktop/resources/app.asar.unpacked/node_modules/ringrtc/build/darwin
14M /usr/lib/signal-desktop/resources/app.asar.unpacked/node_modules/ringrtc/build/linux
12M /usr/lib/signal-desktop/resources/app.asar.unpacked/node_modules/ringrtc/build/win32
some hints:
the arch linux rocket chat package is 23 MB, using https://aur.archlinux.org/cgit/aur.git/tree/?h=rocketchat-desktop
yarn build
yarn run electron-builder --linux --"${!CARCH}" --dir \
-c.electronDist=/usr/lib/electron \
-c.electronVersion="$(</usr/lib/electron/version)"
the arch linux signal package is 318 MB, using https://github.com/archlinux/svntogit-community/tree/packages/signal-desktop/trunk
yarn build-release --dir
the arch linux visual studio code package is 70MB, using https://github.com/archlinux/svntogit-community/tree/packages/code/trunk
This is something we're looking into鈥攖hanks for reporting.
@themighty1
because Signal is an Electron app. Having an Electron app saves the developers from having to worry about differences between Windows/Linux/Macos. Electron uses Chromium engine (the same Engine which Google's Chrome browser uses). Esentially you are downloading the whole browser. The price of that convenience is the size of file you are witnessing. But it makes the developer's life so much easier.

for windows would be nice if one can install electron via chocolatey: https://chocolatey.org/packages/electron + a tiny additional signal package.
there quite a number of electron based applications, losslesscut and others from mifi, visual studio code, and a bazillion others.
Is there any way to build Chrome/Chromium with limited features that aren't used by the Electron app code? For example, why build Chromium with all the audio/video codecs, Browser APIs, 3d-acceleration, etc if they are never invoked? Could bt out-of-scope for this ticket.
Or could you bundle Firefox instead?
I heavily doubt this is possible.
Bundling Firefox isn't AFAIK possible (and if it was - the size would still be big because browsers nowadays are quite complex applications!), but the fact that there are many smaller applications available proves that it is possible to at least somewhat cut down the size while using Electron.
I'm wondering, naively, what's preventing from serving the content as a local web server and optionally loading it as a WebExtension to escalate privileges. Making Electron optional should radically reduce the size.
We did some investigation here and were able to remove ~34MB by removing some unnecessary dependencies (see 8ebe3f0a954baca5b60db7d50829d7614f6f7b66). Though there's always more we could do here, I'm going to close this issue because we probably won't be doing more significant work here. For example, we have no plans to drop Electron as a dependency.
However, I'm happy to review pull requests if people find other specific things that can be removed safely.
@EvanHahn-Signal why you do not want to remove electron, or, make it easy to package it without electron, like rocket chat allows it?
Most helpful comment
@themighty1