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

depend on serde_derive directly #384

Closed

Conversation

jakobhellermann
Copy link
Contributor

If no crate enables the derive feature of serde, then serde and serde_derive can compile in parallel, and anything depending only on serde can compile while serde_derive is not yet done.
This can save up to 5 seconds of compilation, depending on whether this helps the critical chain and if no other crate enables the feature.

This cuts the critical chain of bevy compilation from serde_derive -> serde -> hashbrown -> indexmap -> petgraph -> bevy_utils -> bevy_reflect to serde_derive -> glam -> bevy_math -> bevy_reflect which is faster.

image

@bitshifter
Copy link
Owner

Is glam the only thing in bevy that depends on serde_derive?

@jakobhellermann
Copy link
Contributor Author

The only one that depends on serde { features = ["derive"] } was ron (ron-rs/ron#441) and bevy itself.

@bitshifter
Copy link
Owner

Don't need this one now.

@bitshifter bitshifter closed this Mar 19, 2023
@jakobhellermann jakobhellermann deleted the serde-derive-split branch March 19, 2023 20:44
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.

2 participants