Skip to content

Conversation

@kevinjqliu
Copy link
Contributor

@kevinjqliu kevinjqliu commented Nov 12, 2025

Which issue does this PR close?

What changes are included in this PR?

use lto = "thin", opt-level = "z"

Tested building the wheel locally on mac. And this is the winning combination.

Change Wheel Size Build Time Notes
fat LTO, opt-level=3 (default) 21 MB ~3 min Original
fat LTO, opt-level=z 12 MB ~3 min 43% smaller
thin LTO, opt-level=z 12 MB ~1.5 min Same size, 2x faster build!
no LTO, opt-level=z 13 MB ~1 min Slightly bigger

Size Reduction

This branch vs main branch w/ #1841

Name Old Size New Size % Decrease
wheels-macos-latest-universal2-apple-darwin 44.4 MB 23.5 MB 47.07%
wheels-ubuntu-latest-aarch64 66.1 MB 40.9 MB 38.12%
wheels-ubuntu-latest-armv7l 70.5 MB 33.1 MB 53.05%
wheels-ubuntu-latest-x86_64 23.8 MB 13 MB 45.38%
wheels-windows-latest 25.9 MB 12.7 MB 45.38%
wheels-sdist 575 KB 574 KB

Are these changes tested?

Yes
https://github.com/apache/iceberg-rust/actions/runs/19285828822

Copy link
Contributor

@liurenjie1024 liurenjie1024 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @kevinjqliu for this fix!

@liurenjie1024 liurenjie1024 merged commit cb88260 into main Nov 12, 2025
39 of 40 checks passed
@liurenjie1024 liurenjie1024 deleted the kevinjqliu/more-pyiceberg-core-optimizations branch November 12, 2025 06:45
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.

investigate pyiceberg-core size (currently ~100mb)

2 participants