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

(sqlx-macros) Ignore deps when getting metadata for workspace root #1823

Conversation

CosmicHorrorDev
Copy link
Contributor

@CosmicHorrorDev CosmicHorrorDev commented Apr 21, 2022

When using compile-time queries in a workspace with a single sqlx-data.json file in the workspace root the following code is run to get the path to the workspace root. Because we only need the workspace root we can ignore dep information which ends up being a small, but significant change

I setup a minimal test environment with a single crate in a workspace. Here are the timings of an incremental unchanged cargo check

master (ec15f6b) PR (a4536c8) Diff
228.4 ms ± 1.8 ms 187.2 ms ± 1.5 ms -42.2 ms

I also tested with a workspace that had two crates compiled linearly, and the difference there came out to be roughly 40 ms per crate too

@abonander abonander merged commit 826e63f into launchbadge:master Apr 21, 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.

2 participants