simonbyrne / libcg

MIT License
73 stars 7 forks source link

Strip down library size #7

Closed simonbyrne closed 4 years ago

simonbyrne commented 4 years ago

It currently weights in at 142MB.

@ViralBShah you mentioned this was possible?

ViralBShah commented 4 years ago

Mainly because we use all the stdlibs in the system image. @kristofferC is there a user-accessible way to make a smaller one? By manually removing stdlibs and libraries one does not need?

ViralBShah commented 4 years ago

Eventually, we need the tree shaking to really strip these.

KristofferC commented 4 years ago

There is a filter_stdlibs option that removes stdlibs that is not in the Manifest. The size also depends on how much code gets compiled into it.

ViralBShah commented 4 years ago

The Manifest has InteractiveUtils, Markdown, Sockets - none of which seem relevant here. Where might they be coming from?

simonbyrne commented 4 years ago

The Manifest has InteractiveUtils, Markdown, Sockets - none of which seem relevant here. Where might they be coming from?

It's because I have PackageCompiler.jl in the same Manifest. I'll split them out.

simonbyrne commented 4 years ago

Doing these two seems to cut it down by a factor of 1/2 (140MB -> 70MB): https://github.com/simonbyrne/libcg/pull/12