-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
[Merged by Bors] - Make some asset loading functions monomorphic #1861
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
None of the changes are public facing, this is entirely internal.
For cg_llvm in release mode breakout shrinks from 356k to 316k. For cg_llvm in debug mode breakout shrinks from 3814k to 3057k. |
a6217c2
to
0851fd8
Compare
} | ||
|
||
// TODO: properly set failed LoadState in all failure cases | ||
async fn load_async<'a, P: Into<AssetPath<'a>>>( | ||
async fn load_async<'a>( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For now I think this is reasonable because we don't export it. But some potential future pub async load_async()
variant should be generic to have parity with load().
This reduces the size of executables when using bevy as dylib by ensuring that they get codegened in bevy_assets instead of the game itself. This by extension avoids pulling in parts of bevy_tasks and async_task. Before this change the breakout example was 923k big after this change it is only 775k big for cg_clif. For cg_llvm in release mode breakout shrinks from 356k to 316k. For cg_llvm in debug mode breakout shrinks from 3814k to 3057k.
0851fd8
to
8592b86
Compare
CI passes. |
bors r+ |
This reduces the size of executables when using bevy as dylib by ensuring that they get codegened in bevy_assets instead of the game itself. This by extension avoids pulling in parts of bevy_tasks and async_task. Before this change the breakout example was 923k big after this change it is only 775k big for cg_clif. For cg_llvm in release mode breakout shrinks from 356k to 316k. For cg_llvm in debug mode breakout shrinks from 3814k to 3057k.
Pull request successfully merged into main. Build succeeded: |
This reduces the size of executables when using bevy as dylib by ensuring that they get codegened in bevy_assets instead of the game itself. This by extension avoids pulling in parts of bevy_tasks and async_task. Before this change the breakout example was 923k big after this change it is only 775k big for cg_clif. For cg_llvm in release mode breakout shrinks from 356k to 316k. For cg_llvm in debug mode breakout shrinks from 3814k to 3057k.
This reduces the size of executables when using bevy as dylib by ensuring that they get codegened in bevy_assets instead of the game itself. This by extension avoids pulling in parts of bevy_tasks and async_task. Before this change the breakout example was 923k big after this change it is only 775k big for cg_clif. For cg_llvm in release mode breakout shrinks from 356k to 316k. For cg_llvm in debug mode breakout shrinks from 3814k to 3057k.
This reduces the size of executables when using bevy as dylib by
ensuring that they get codegened in bevy_assets instead of the game
itself. This by extension avoids pulling in parts of bevy_tasks and
async_task.
Before this change the breakout example was 923k big after this change
it is only 775k big for cg_clif. For cg_llvm in release mode breakout
shrinks from 356k to 316k. For cg_llvm in debug mode breakout shrinks
from 3814k to 3057k.