-
Notifications
You must be signed in to change notification settings - Fork 30
Remove debug symbols from embedded libssh build in wheels #43
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
Comments
Thanks for the interest. If we can keep the .pyx files separate and still bundle them all into one extension then yes, I'm in favour of doing this. |
Cython in principle supports compiling multiple pyx files into one extension, but I didn't find a way to cimport things between them when doing so However, I noticed that the Linux wheels are shipping with full debug symbols in all libraries which is rather unnecessary ime. Removing those and the cythonized source from the wheels already reduces size by a lot. Another thing that could be done is to reduce the OpenSSL build size, right now we're doing a default libcrypto build which includes a lot of stuff that libssh doesn't use. That's a bit more fiddly though, and likely has less impact. |
Yes, same when I was first writing this. I couldn't find a good way to keep the .pyx separate and generate one .so. Stripping debug symbols would be good. If you mean package_data, those can't be excluded. They're compiled dependencies and Cython header files (.pxd), not full sources. |
Currently there is one native extension for each libssh module (give or take), however due to how Cython tends to work out each native extension is relatively large. Currently wheels have around ~5-6 MB in native extensions. We could combine all the native extensions into a single, much smaller extension and then just have small Python modules for exporting the same API structure as before instead. This would make the wheels and installed size smaller and reduce the memory footprint as well.
If you're open to the idea I can spin a patch for this.
The text was updated successfully, but these errors were encountered: