From 51471247fe58ea4ff1ffd175786a095ae1fd0156 Mon Sep 17 00:00:00 2001 From: Stefan Karpinski Date: Thu, 29 Oct 2020 14:18:28 -0400 Subject: [PATCH] Windows: prefer git cloning registries (close #2014) Since untarring a tarball like the registry is so slow on Windows, we prefer to git clone registries instead. Git is slow on Windows as well, but git updates are faster since git only updates the files that need to be modified, which is much faster than unpacking a whole new registry. --- src/Types.jl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Types.jl b/src/Types.jl index 6dfcab8c08..a7604af411 100644 --- a/src/Types.jl +++ b/src/Types.jl @@ -974,7 +974,8 @@ function clone_or_cp_registries(ctx::Context, regs::Vector{RegistrySpec}, depot: # clone to tmpdir first mktempdir() do tmp url, registry_urls = pkg_server_registry_url(reg.uuid, registry_urls) - if url !== nothing + # on Windows we prefer git cloning because untarring is so slow + if !Sys.iswindows() && url !== nothing # download from Pkg server try download_verify_unpack(url, nothing, tmp, ignore_existence = true)