Skip to content
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

Remove windows executables from distutils and distlib #1467

Merged
merged 4 commits into from
Apr 14, 2021

Conversation

hoodmane
Copy link
Member

This resolves #653. I removed another copy of those same executables from the standard library too.

src/core/main.c Outdated Show resolved Hide resolved
@hoodmane
Copy link
Member Author

I looked around for more stuff we could remove from stdlib. One idea would be to remove some of the text encodings, the stdlib defines ~250 text encodings which take up 1.7mb of disk space. If we reduce it to ~20 encodings then that saves 1.5mb, which seems to be around 600kb compressed. Other than that, it's a bit hard to know what we could take out.

@rth
Copy link
Member

rth commented Apr 14, 2021

I removed another copy of those same executables from the standard library too.

Edit I can't see those in

>>> os.listdir('/lib/python3.8/distutils/')  # including sub-folders
os.listdir('/lib/python3.8/distutils/')

and the size decrease of pyodide.asm.data is too small to account for it.
Maybe they were already excluded in some other way?

Master

-rw-r--r-- 1 root root 580K Apr 13 21:22 distlib.data
-rw-r--r-- 1 root root  13K Apr 13 21:22 distlib.js
[..]
-rw-r--r-- 1 root root 5.2M Apr 13 21:21 pyodide.asm.data
-rw-r--r-- 1 root root 3.6M Apr 13 21:22 pyodide.asm.js
-rwxr-xr-x 1 root root  11M Apr 13 21:22 pyodide.asm.wasm
-rw-r--r-- 1 root root  30K Apr 13 21:22 pyodide.js

This PR,

-rw-r--r-- 1 root root 294K Apr 14 06:01 distlib.data
-rw-r--r-- 1 root root 9.5K Apr 14 06:01 distlib.js
[...]
-rw-r--r-- 1 root root 5.1M Apr 14 06:00 pyodide.asm.data
-rw-r--r-- 1 root root 3.6M Apr 14 06:01 pyodide.asm.js
-rwxr-xr-x 1 root root  11M Apr 14 06:01 pyodide.asm.wasm

If we reduce it to ~20 encodings then that saves 1.5mb, which seems to be around 600kb compressed.

Nice! As long as it's not difficult to determine which ones to keep.

Other than that, it's a bit hard to know what we could take out.

I think there is lots of things we can do in that direction, but I would rather leave it for the next release. #646

@hoodmane
Copy link
Member Author

leave it for the next release

Indeed, I'm getting distracted here.

@hoodmane
Copy link
Member Author

Edit I can't see those in
...
Maybe they were already excluded in some other way?

I think I was confused about this. I now believe that the .exe filter is not needed, I'll remove it.

@rth rth merged commit 1574d3d into pyodide:master Apr 14, 2021
@hoodmane hoodmane deleted the remove-executables branch April 14, 2021 16:16
hamlet4401 pushed a commit to tytgatlieven/pyodide that referenced this pull request Jul 3, 2021
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

Successfully merging this pull request may close these issues.

Remove bundled windows executables in distlib
2 participants