This is an automated email from the ASF dual-hosted git repository.
liurenjie1024 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/iceberg-rust.git
The following commit(s) were added to refs/heads/main by this push:
new cb882602 pyiceberg-core: create even smaller artifacts (#1844)
cb882602 is described below
commit cb8826027007b206719461745768516aef55c063
Author: Kevin Liu <[email protected]>
AuthorDate: Tue Nov 11 22:45:57 2025 -0800
pyiceberg-core: create even smaller artifacts (#1844)
## Which issue does this PR close?
- Closes #1839
## 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](https://github.com/apache/iceberg-rust/actions/runs/19285828822)
vs [main branch w/
#1841](https://github.com/apache/iceberg-rust/actions/runs/19280546898/attempts/1)
| 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
---
bindings/python/Cargo.toml | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/bindings/python/Cargo.toml b/bindings/python/Cargo.toml
index f94b5695..953d4a98 100644
--- a/bindings/python/Cargo.toml
+++ b/bindings/python/Cargo.toml
@@ -41,5 +41,6 @@ tokio = { version = "1.46.1", default-features = false }
[profile.release]
codegen-units = 1
debug = false
-lto = "fat"
+lto = "thin"
+opt-level = "z"
strip = true