Skip to content

perf: enable aggressive release build optimizations#133

Merged
coder3101 merged 2 commits into
coder3101:mainfrom
AlexCannonball:perf/optimize-release-profile
May 16, 2026
Merged

perf: enable aggressive release build optimizations#133
coder3101 merged 2 commits into
coder3101:mainfrom
AlexCannonball:perf/optimize-release-profile

Conversation

@AlexCannonball
Copy link
Copy Markdown
Contributor

@AlexCannonball AlexCannonball commented May 16, 2026

Description

Closes #132

This PR optimizes the release profile settings in Cargo.toml. It introduces Link-Time Optimization (LTO), reduces code generation units to a single core for maximum compiler analysis, and strips heavy debug data while maintaining human-readable panic logs.

How Was This Tested?

Tested locally inside the Devcontainer. Verified binary size differences using ls -lh. Drops from 6.9 MB to 4.7 MB (~32% reduction):

image

cargo build --release took ~46 seconds with build optimizations vs. ~18 seconds with no optimizations. I used cargo clean before each build command.

@AlexCannonball
Copy link
Copy Markdown
Contributor Author

If we need to improve the release workflow duration, Swatinem/rust-cache@v2 should help.

@AlexCannonball AlexCannonball force-pushed the perf/optimize-release-profile branch from 81cd45a to 9863f53 Compare May 16, 2026 09:36
@coder3101
Copy link
Copy Markdown
Owner

If we need to improve the release workflow duration, Swatinem/rust-cache@v2 should help.

definitely, that could be a follow up!

@coder3101 coder3101 merged commit be80bd3 into coder3101:main May 16, 2026
1 check passed
@AlexCannonball AlexCannonball deleted the perf/optimize-release-profile branch May 16, 2026 17:11
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.

Proposal: Enable aggressive release build optimizations

2 participants