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

Reduce size of _metadata.py files #636

Open
ronaldoussoren opened this issue Jan 7, 2025 · 0 comments
Open

Reduce size of _metadata.py files #636

ronaldoussoren opened this issue Jan 7, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@ronaldoussoren
Copy link
Owner

The bindings for a number of frameworks, including pyobjc-framework-Cocoa have pretty large _metadata.py files. E.g., the _metadata.py for Foundation is currently 460KB and it compresses down to 56KB using gzip -9.

Find a way to optimize the size, preferably without ending up effectively obfuscating python code.

Options I've though of so far:

  • Actually use compression
  • Generate simpler code (calls to registerMetadataForSelector can be more compact)
  • Design a binary format for the metadata and use that instead of the python code
  • Compile _metadata.py into and extension module somehow (although that's likely counter productive)
@ronaldoussoren ronaldoussoren added the enhancement New feature or request label Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant