Skip to content

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

@zkochan

Description

@zkochan

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())
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions