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

What's behind the extension size? #4

Open
dimaqq opened this issue Nov 12, 2024 · 0 comments
Open

What's behind the extension size? #4

dimaqq opened this issue Nov 12, 2024 · 0 comments

Comments

@dimaqq
Copy link

dimaqq commented Nov 12, 2024

The compiled extension is 17MB on Linux and 3.8MB on macOS.

I wonder why.

> ls -halt  /home/dima.linux/.cache/uv/archive-v0/pdZemBY4kqsWFZkxQUvNQ/lib/pypy3.10/site-packages/reqwest/
total 17M
drwxrwxr-x  3 dima dima 4.0K Nov 12 15:42 ./
drwxrwxr-x  2 dima dima 4.0K Nov 12 15:42 __pycache__/
drwxrwxr-x 38 dima dima 4.0K Nov 12 15:22 ../
-rwxrwxr-x  2 dima dima  17M Nov 12 15:22 reqwest.pypy310-pp73-aarch64-linux-gnu.so*
-rw-rw-r--  2 dima dima  111 Nov 12 15:22 __init__.py
-rw-rw-r--  2 dima dima    0 Nov 12 15:22 py.typed
-rw-rw-r--  2 dima dima  523 Nov 12 15:22 __init__.pyi

If I strip the shared object, it's down to 3.2MB.

And it's not like all the dependencies are compiled in:

> ldd /home/dima.linux/.cache/uv/archive-v0/pdZemBY4kqsWFZkxQUvNQ/lib/pypy3.10/site-packages/reqwest/reqwest.pypy310-pp73-aarch64-linux-gnu.so
	linux-vdso.so.1 (0x0000eff085972000)
	libssl.so.3 => /lib/aarch64-linux-gnu/libssl.so.3 (0x0000eff085530000)
	libcrypto.so.3 => /lib/aarch64-linux-gnu/libcrypto.so.3 (0x0000eff085000000)
	libgcc_s.so.1 => /lib/aarch64-linux-gnu/libgcc_s.so.1 (0x0000eff0854f0000)
	libc.so.6 => /lib/aarch64-linux-gnu/libc.so.6 (0x0000eff084e40000)
	/lib/ld-linux-aarch64.so.1 (0x0000eff085935000)

I'm curious what goes in there.

@dimaqq dimaqq changed the title What's behind the extension side? What's behind the extension size? Nov 14, 2024
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

1 participant