robotpy / roborio-packages

Build files for RobotPy ipk packages
6 stars 2 forks source link

Why is the python3 ipk so big? #1

Closed virtuald closed 9 years ago

virtuald commented 9 years ago

Just curious, @PeterJohnson , the python3 ipk is something like 32MB? Given that the windows MSI files are ~15MB or so, and older RobotPy was ~10MB, that seems a bit big. Not that it matters too much (LabVIEW is a 4GB download, after all), but I am curious about it.

PeterJohnson commented 9 years ago

Three major reasons. First, it's built with debug info. Second, there are both static and shared libraries in the package. Third, it includes all of the precompiled library files (e.g. pycache directories). They're all fixable with varying degrees of difficulty (the last one is perhaps the hardest, as we would need to write an appropriate postinst script to do the compilation at the end of the install).

virtuald commented 9 years ago

The debuginfo is probably the culprit. Other distributions come with the debuginfo separately... but, I suppose 32mb isn't so bad, given the number of users we have.

PeterJohnson commented 9 years ago

Not sure about compressed size, but uncompressed the pycache files are the majority (60MB of the 103MB total). The .so is 8MB and the .a is 11MB. The next major size is the pip _vendor directory, which weighs in at almost 8MB.

virtuald commented 9 years ago

Oh wow. Hasn't someone written a postinst script to generate the pyc files? Perhaps the debian package?

PeterJohnson commented 9 years ago

Packages updated to split debug and dev and remove the compiled files. The python3 basic package is now less than 9 MB. The downside is it now takes substantially longer (a minute or more) to install due to the compilation of all the .pyc and .pyo library files. We can change this back if it becomes an issue.

virtuald commented 9 years ago

Cool, thanks!