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

optimize for size #6

Merged
merged 1 commit into from Aug 16, 2021
Merged

optimize for size #6

merged 1 commit into from Aug 16, 2021

Conversation

caass
Copy link
Contributor

@caass caass commented Aug 16, 2021

No description provided.

@caass
Copy link
Contributor Author

caass commented Aug 16, 2021

ack i left my "format on save" on for the sandbox...but all i did was take out the optimizations in there, since they don't actually change anything in a workspace

@nilslice
Copy link
Contributor

@caass -- out of curiosity, what size impact did you notice this had on the rust-sandbox worker for example?

@caass
Copy link
Contributor Author

caass commented Aug 16, 2021

i didn't check, but now i'm thinking it's better to leave it in there on rust-sandbox since it's more likely we'll be running wasm-pack build commands in there as a single crate, and not as a member of a workspace. although. maybe it'll still treat it like a member of a workspace

@nilslice
Copy link
Contributor

we should always check 👍

and, you're right, this crate will far more often be build as a dep inside some end-user's project (using wasm-pack or something else in the future) vs. a workspace member.

@caass
Copy link
Contributor Author

caass commented Aug 16, 2021

so i have found out it gets treated as a workspace member regardless of where you compile it from. so i dont think we need the profile to stay in rust-sandbox, but it doesn't really matter too much.

before optimizations (compiled in release mode):

Screen Shot 2021-08-16 at 10 38 53 AM

after optimizations (release mode):

Screen Shot 2021-08-16 at 10 40 53 AM

10% savings on size

@nilslice
Copy link
Contributor

sweet -- thank you!

@nilslice nilslice self-requested a review August 16, 2021 16:28
@nilslice
Copy link
Contributor

will merge as-is, but i'll include a revert on the Cargo.toml indentation in a future PR.

@nilslice nilslice merged commit c5113a0 into main Aug 16, 2021
@nilslice nilslice deleted the cass/optimize-for-size branch August 16, 2021 16:29
ByteAlex pushed a commit to ByteAlex/workers-rs that referenced this pull request Apr 8, 2022
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.

None yet

2 participants