-
Notifications
You must be signed in to change notification settings - Fork 15.8k
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
Expected app bundle size? #2003
Comments
That's the expected size, there is no way to make it smaller. |
Is it really expected to be that large? my bundled windows and linux builds are much smaller, and looking into the Electron Framework folder, there are three copies of the Electon Framework file, one on each: Contents\Frameworks\Electron Framework.framework Are these supposed to be symbolic links? |
How small are the Windows and Linux builds? |
I am also wondering about this. Here are the sizes for my electron app: osx - 117.3 mb linux32 - 60.3 mb linux64 - 55.2 mb win ia32 - 47.8 mb win x64 - 66.2 mb Thanks! |
Is there a plan to try to reduce the size of the framework in future releases? This makes it hard to justify using Electron for small apps (where the size of the app itself would be dwarfed by the size of Electron). |
I can confirm that my electron app bundles are about the same size as @davefedele. |
You can zip your app and if you're using But Electron will always have a large part of Chrome in it so there is only so much that can be done. Electron itself right now is ~33MB. |
OS X compressed is similarly sized to other platforms which probably means that the app you're using to measure sizes is perhaps misinterpreting symlinks? |
In my case I am using an electron-boilerplate that does not use I'll have to look into it, is there anywhere a list of the symlinks present? I have very limited access to a mac computer (I use a CI server to pack my app for each platform). |
|
I was finally able to look into this yesterday, and indeed my issue was caused by symlinks not being preserved. So my application size drastically shrunk from ~110Mbs, to ~45Mbs. |
@carlosperate Can you describe how you fixed your symlinks? |
Well, it is important to emphasise that I am not using So, in my specific case there were two issues with my script, I was copying the electron files without respecting symlinks (very easy to fix), and then the |
FWIW, when creating a zip on Linux for distribution to OS X, you'll have to use the $ zip -r -y app.zip app |
What has #SLACK done? Why is their app so small? |
The Windows and linux versions are more or less what I'd expect, I wonder how they've got their OSX version so small. |
Last I checked slack were using MacGap for the mac side |
http://electron.atom.io/#built-on-electron Slack is there in the list. |
Yes, Slack's Windows and Linux apps are built on Electron, but the Mac app uses MacGap. |
@joshaber I think you're correct. The Slack mac app is only ~36 MB. |
The idea was found in electron's issue (electron/electron#2003 (comment)). Thanks.
Do you guys know if Electron has any plan for reducing the final bundle size? That'd be incredible. |
There is only so much you can take out of Chromium, Node.js, V8, etc and still have a working product. Unfortunately since everything is patched in order to work it isn't as easy as making it use standalone versions of each to cut down on the size. I am sure the Electron team would like a smaller size. But you just can't plan and make it happen. It is just too caustic on the overall project to go in thinking you can remove even 10-20 megs of code and resources and expect everything to run stable. |
So true @baconface... One thing though has helped me out here: I was putting modules like electron-prebuilt, electron-builder and electron-packager and all their dependencies in the "app" folder. Cutting them off from app's package.json and building again saved me a lot of size. I used the two-package.json structure from electron-builder. |
One thing I saw when moving more dependencies to devDependencies, the more time it needs to build it.
It spent a lot more time on "building renderer process", and the animated icon stop like it crashes but it didn't. Then it show 203778ms from the renderer report. Moving devDependencies back to dependencies, build time is normal again but app is big. If I'm not having any error during build, it means it's all good right? |
@karimhossenbux This is normal for me. There is a walk function in |
@baconbrad Thank you! I'm using |
Is there any electron package builder that includes only your source and download others (only necessary for the current operating system user runs on) when the user runs your app for the first time ?. It would make it easy for distribution and should reduce your app size considerably. |
Electron, please do not go the "ERE" route. Yes, I know you are bloated, but I love how people can download my application and it just runs great without having to screw around with installing deps, updating the runtime environment, or any of that nonsense that I thought we got rid of circa 2003. |
Well, downloading a bundle would still be an option. Nothing to complain
about here :)
Le ven. 25 mai 2018 à 21:03, Luke Pighetti <[email protected]> a
écrit :
… Electron, please do not go the "ERE" route. Yes, I know you are bloated,
but I love how people can download my application and it just runs great
without having to screw around with installing deps, updating the runtime
environment, or any of that nonsense that I thought we got rid of circa
2003.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2003 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AApUIBjAeVZ7T4SKo8LyW6RT65XnpiKgks5t2FWfgaJpZM4FGGer>
.
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
If your application is more than 100MB, Your app will then "only" 50MB ... |
My app is little- here's the repo. The latest experimental version weights about 700mb |
Amazing! Could you share about how to reduce electron app to so small size. |
@mvladic , como faço para compactar meus arquivos no electron-forge? Estou com o mesmo problema e no electron sou iniciante. |
@davefedele , como fez para que seus arquivos tivessem em média 50mb ? Os meus estão em torno de 100-150mb. |
Maybe he bundles the files? I'm not sure tho. |
You can: |
I have an idea how we can reduce the size of the Electron application. We can make it so that Electron is installed once on the computer, along with Node.js and all the necessary dependencies, and then just ship the application with the necessary source code, which will eventually be executed by the local Electron. Sort of like a Java application. |
That's been suggested many times, and no, it won't be done. |
When building the latest 0.27.3 the mac app bundle is about 142MB of which 136MB come from the Electron Framework.
Is there any way to make this package smaller?
The text was updated successfully, but these errors were encountered: