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

Alire checks manifest files of all releases in index for no reason #910

Closed
onox opened this issue Jan 14, 2022 · 1 comment · Fixed by #1085
Closed

Alire checks manifest files of all releases in index for no reason #910

onox opened this issue Jan 14, 2022 · 1 comment · Fixed by #1085
Labels
cost: 2-medium Moderate/isolated changes required (<1d) cost: 3-high Extensive/tangled changes required (<1w) type: enhancement Improvements to existing functionality

Comments

@onox
Copy link
Contributor

onox commented Jan 14, 2022

When running commands like alr clean or alr run -s (probably other commands as well), Alire seems to parse every single .toml file in the index. This adds like over half a second of startup latency to alr run. Why are these files parsed at all?

@mosteo
Copy link
Member

mosteo commented Jan 14, 2022

Essentially, anything that involves dependencies (like building before running) currently requires the index to be loaded in full to ensure that dependencies are properly in place.

There are several evident optimizations that we could make. A general one would be to only load dependencies on demand: #381 (and also only load the required crates recursively). Another one is, if we have a lockfile and there are no dependencies, do not load anything. Also we could rely on the lockfile to check that dependencies are in place, although this has collateral implications that make it not trivial.

But in essence it is a matter of time/priority for this to become a target for optimization.

@mosteo mosteo added cost: 2-medium Moderate/isolated changes required (<1d) cost: 3-high Extensive/tangled changes required (<1w) type: enhancement Improvements to existing functionality labels Jan 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cost: 2-medium Moderate/isolated changes required (<1d) cost: 3-high Extensive/tangled changes required (<1w) type: enhancement Improvements to existing functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants