New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: remove unnecessary modules from npm-shrinkwrap.json
#1017
Conversation
Somehow some development dependencies slipped into the shrinkwrap file, and in some cases, dependencies we don't use anymore didn't remove its own now unneeded dependencies when running `npm uninstall`. This PR carefully removes the packages that are not needed anymore, which are a lot. See: #820 Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
will this reduce the size of the binary considerably?
…--
*Alexandros Marinos*
Founder & CEO, Resin.io
+1 206-637-5498
@alexandrosm
On Wed, Jan 11, 2017 at 9:53 PM, Juan Cruz Viotti ***@***.***> wrote:
Merged #1017 <#1017>.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1017 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ABLUCF3imWMRJhcYGanmz5toA_Jlg3EZks5rRU9RgaJpZM4LhA-q>
.
|
The uncompressed size of the In terms of binary size, the GNU/Linux x86_64 AppImage was reduced from 68M to 54MB 🎉 I just noticed that the fact the development dependencies where included in the shrinkwrap file was caused by an NPM bug (v3). Upgrading to a later version (v4) correctly ignores dependencies of development dependencies, however it hangs at a later stage, causing the |
that's nuts! great work juanchi! I assume we could investigate having a
blacklist of some big files chromium/electron includes which we could look
at deleting? (codecs, libraries, etc that are not supre relevant?)
…--
*Alexandros Marinos*
Founder & CEO, Resin.io
+1 206-637-5498
@alexandrosm
On Thu, Jan 12, 2017 at 4:28 PM, Juan Cruz Viotti ***@***.***> wrote:
The uncompressed size of the node_modules directory was reduced from 179M
to 85M, which a *huge* win.
In terms of binary size, the GNU/Linux x86_64 AppImage was reduced from
68M to 54MB 🎉
I just noticed that the fact the development dependencies where included
in the shrinkwrap file was caused by an NPM bug (v3). Upgrading to a later
version (v4) correctly ignores dependencies of development dependencies,
however it hangs at a later stage, causing the npm shrinkwrap command to
be unusable.... I'll give yarn a try again. Hopefully the issues I
encountered before were fixed and we can finally forget about this
npm/shrinkwrap hell :/
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1017 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ABLUCOvgmcJnEmQvoNarTK2IdTd5aMMqks5rRlSogaJpZM4LhA-q>
.
|
I think we can delete some ffmpeg stuff (although not sure its shipped on electron by default due to licensing issues). I'll definitely research if there is something more we can do. If we really want to reduce the Electron framework size by deleting unnecessary stuff, I think we can get REALLY good results by building Electron ourselves as part of an Etcher release, customizing certain build options and applying some patches to ignore certain stuff. |
From what I can tell (I could be wrong) ffmpeg etc. is included because it's a runtime dependency of the Chrome/Chromium engine. So I wonder of there's scope for further size-reduction by disabling certain Chromium features and building that too? Although I suspect that'd massively increase build times? *shrug* |
The Electron teams has pre-built Chromium packages that the Electron building system fetches from the internet to avoid having to re-compile the whole thing. Fiddling with Chromium might not be easy, but its certainly possible, and we can host our own pre-built versions of it so we only re-compile the Electron part. |
OTOH, hopefully there's more low-hanging-fruit we can pluck to reduce the binary file-sizes, before we start needing to mess about with recompiling Chromium ;) |
Somehow some development dependencies slipped into the shrinkwrap file,
and in some cases, dependencies we don't use anymore didn't remove its
own now unneeded dependencies when running
npm uninstall
.This PR carefully removes the packages that are not needed anymore,
which are a lot.
See: #820
Signed-off-by: Juan Cruz Viotti jviotti@openmailbox.org