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

perf: resolution should not be blocked by fetching packages to the store #134

Open
zkochan opened this issue Oct 1, 2023 · 0 comments
Open

Comments

@zkochan
Copy link
Member

zkochan commented Oct 1, 2023

The resolution stage should not be blocked by the fetch stage. Once we resolve a dependency, we should immediately proceed to resolving its own dependencies. Fetching of packages to the store should happen in parallel.

Currently, resolution is blocked by fetching packages to the store as seen in this function:

pub async fn find_package_version_from_registry(
tarball_cache: &Cache,
config: &'static Npmrc,
http_client: &reqwest::Client,
name: &str,
version: &str,
symlink_path: &Path,
) -> Result<PackageVersion, PackageManagerError> {
let package = Package::fetch_from_registry(name, http_client, &config.registry).await?;
let package_version = package.pinned_version(version).unwrap();
internal_fetch(tarball_cache, http_client, package_version, config, symlink_path).await?;
Ok(package_version.to_owned())
}

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

No branches or pull requests

1 participant