Skip to content

Installation takes 25GB? #109

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

Open
kripken opened this issue Oct 19, 2017 · 10 comments
Open

Installation takes 25GB? #109

kripken opened this issue Oct 19, 2017 · 10 comments

Comments

@kripken
Copy link
Member

kripken commented Oct 19, 2017

A rust user trying emscripten says the install was slo and took 25GB. I suppose that's because it downloaded the full git reports of LLVM and clang and built from source - but doesn't the emsdk default to downloading a binary now on all platforms?

Perhaps we should warn when downloading the full git repos? In particular if we download the full repos for installing incoming, maybe we could warn and say people should install the latest tag instead - assuming for tags we download just the tag and not the full git repo?

@kripken
Copy link
Member Author

kripken commented Oct 20, 2017

Another comment there suggests the large size is due in large part to defaulting to debug or assertions building.

@kripken
Copy link
Member Author

kripken commented Oct 21, 2017

One possible option here is to port clang/llvm to wasm. Then if the emsdk ships with a wasm vm, it can run those binaries instead of native binaries, on any platform. So say if there aren't native binaries for a platform, we could use that?

@juj
Copy link
Collaborator

juj commented Oct 21, 2017

This issue indeed comes from the debug info being present for callstacks in case of an assertion failure (i.e. choosing RelWithDebInfo CMake build mode). That is documented here: https://github.com./juj/emsdk/blob/master/emsdk#L1965. The rationale there for that choice has been that sdk-incoming-64bit is what developers developing Emscripten would prefer to have out of the box, and Emscripten users would be using the other build targets (i.e. CMake Release build mode).

If one does emsdk install sdk-incoming-64bit, then that gives the large size. If one does emsdk install latest, emsdk install sdk-nightly-yyyymmdd, emsdk install sdk-tag-x.yy.zz, emsdk install sdk-master-64bit or emsdk install sdk-incoming-64bit --build=Release, then that gets the Release build with small size and no assertions or debug info.

@MortenLohne
Copy link

I'm the user who posted on rust-lang. I screenshotted Disk Usage's output of the emsdk folder, if it's useful for anyone. The excessive disk usage seems to be almost entirely due to large binaries. For example, the clang binary is 1.4GB by itself.

@kripken
Copy link
Member Author

kripken commented Oct 24, 2017

1.4GB for clang seems like it has to be a bug. @MortenLohne what OS is that on? I wonder if it's platform-specific. Although I remember hearing that LLVM debug info in general is "too big", I wonder if this is just that.

@juj thanks for the info. Makes sense. How about if we add some notification though, for emsdk install sdk-incoming-64bit, that it is building from source and that it is doing so with debug info which may be large, and a pointer to how to get just the binary for those that prefer that?

@saschanaz
Copy link
Contributor

saschanaz commented Dec 2, 2017

It's 10.5GB on Windows 10 🤔

image

image

@kgryte
Copy link

kgryte commented Jan 25, 2018

On my Macbook, clang, as installed via emsdk, consumes 10.2GB.

Update: when building with flag --build=Release, clang consumes 1.69GB on my Macbook.

kgryte added a commit to stdlib-js/stdlib that referenced this issue Jan 26, 2018
This commit sets the `--build` flag to `Release`, as, by default,
`emsdk` builds with additional debug info which significantly
inflates the final build size (~10GB). Setting to `Release` ensures
that the debug info is not included, reducing the size of `clang`
to around `~1.7GB` on my Macbook. While not "small", this does
significantly reduce the footprint.

References:

-   https://github.com./juj/emsdk/blob/2324e5d8f419483bd4025c6ebb4eef1635d35625/emsdk#L1996
-   emscripten-core/emsdk#109
@saschanaz
Copy link
Contributor

The latest emsdk defaults to Release build. cea44f4

@saschanaz
Copy link
Contributor

(See also emscripten-core/emscripten#6016)

@kgryte
Copy link

kgryte commented Jan 26, 2018

@saschanaz Thanks for the links!

vargaz pushed a commit to vargaz/emsdk that referenced this issue Nov 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants