4.5.8
Environment Info:
  System:
    OS: macOS Mojave 10.14.4
    CPU: (4) x64 Intel(R) Core(TM) i7-4650U CPU @ 1.70GHz
  Binaries:
    Node: 15.0.0 - ~/.nvm/versions/node/v15.0.0/bin/node
    Yarn: 1.22.4 - /usr/local/bin/yarn
    npm: 7.0.2 - ~/.nvm/versions/node/v15.0.0/bin/npm
  Browsers:
    Chrome: 86.0.4240.111
    Edge: Not Found
    Firefox: 78.0.1
    Safari: 12.1
  npmGlobalPackages:
    @vue/cli: Not Found
---
Current registry: https://registry.yarnpkg.com
I don鈥檛 know how to reproduce this exactly, unfortunately.
The CLI only suggests another registry if it鈥檚 significantly better than the current registry.
The CLI suggests https://registry.npm.taobao.org which has a response time of 15-45-times the current registry鈥檚 response time.
Example output of testing the response time with curl. I reproduced this multiple times.
kev@KevsMacBook ~ $ curl -w "@curl-format.txt" -o /dev/null -s https://registry.npm.taobao.org/siegegg-api
    time_namelookup:  0.266313
       time_connect:  0.313511
    time_appconnect:  0.411322
   time_pretransfer:  0.411606
      time_redirect:  0.000000
 time_starttransfer:  15.695086
                    ----------
         time_total:  15.695307
kev@KevsMacBook ~ $ curl -w "@curl-format.txt" -o /dev/null -s https://registry.npmjs.org/siegegg-api
    time_namelookup:  0.029874
       time_connect:  0.073676
    time_appconnect:  0.200626
   time_pretransfer:  0.200845
      time_redirect:  0.000000
 time_starttransfer:  1.160862
                    ----------
         time_total:  1.162009
kev@KevsMacBook ~ $ curl -w "@curl-format.txt" -o /dev/null -s https://registry.yarnpkg.com/siegegg-api
    time_namelookup:  0.004120
       time_connect:  0.065280
    time_appconnect:  0.243338
   time_pretransfer:  0.243497
      time_redirect:  0.000000
 time_starttransfer:  0.351197
                    ----------
         time_total:  0.356865
Could you test this code which is used by CLI? Does it always return taobao registry?
@fangbinwei, it doesn't always return the taobao registry. Looks like the 15s yesterday were pretty random. :thinking:

I've modified the script to show the time for both requests. It also checks more than one package because I think this might not be a bug inside vue cli.
First time 
node main.js
Using vue-cli-version-marker https://registry.yarnpkg.com: 541.241ms https://registry.npm.taobao.org: 558.983ms Using siegegg-api https://registry.yarnpkg.com: 418.443ms https://registry.npm.taobao.org: 1851.088ms Using express https://registry.yarnpkg.com: 408.303ms https://registry.npm.taobao.org: 1738.040ms Using request https://registry.yarnpkg.com: 406.914ms https://registry.npm.taobao.org: 1123.147ms Using ts-node https://registry.yarnpkg.com: 409.492ms https://registry.npm.taobao.org: 430.789ms Using axios https://registry.yarnpkg.com: 385.833ms https://registry.npm.taobao.org: 1614.157ms Using bootstrap https://registry.yarnpkg.com: 411.516ms https://registry.npm.taobao.org: 1024.958ms Using jquery https://registry.yarnpkg.com: 406.809ms https://registry.npm.taobao.org: 1967.655ms
Second time 
node main.js
Using vue-cli-version-marker https://registry.npm.taobao.org: 256.945ms https://registry.yarnpkg.com: 468.953ms Using siegegg-api https://registry.npm.taobao.org: 156.621ms https://registry.yarnpkg.com: 399.340ms Using express https://registry.npm.taobao.org: 227.382ms https://registry.yarnpkg.com: 366.645ms Using request https://registry.npm.taobao.org: 159.970ms https://registry.yarnpkg.com: 357.367ms Using ts-node https://registry.npm.taobao.org: 102.781ms https://registry.yarnpkg.com: 404.320ms Using axios https://registry.npm.taobao.org: 130.075ms https://registry.yarnpkg.com: 406.246ms Using bootstrap https://registry.npm.taobao.org: 307.449ms https://registry.yarnpkg.com: 351.657ms Using jquery https://registry.npm.taobao.org: 215.520ms https://registry.yarnpkg.com: 342.015ms
It appears that Taobao's registry is slower for initial requests but faster for subsequent requests (caching?). So that's why I think it's not a bug in Vue CLI, as the Taobao registry is faster after the first initial much slower request. From my side, I'd close the issue, it's probably just weird behavior by the registries and the Taobao one appears to be actually faster except for the first request which confused me. :sweat_smile:
This feature is friendly to Chinese users, sine taobao registry is always faster than other registries. For other areas with fast internet, it鈥檚 hard to say which registry is faster 馃槩
Yeah, that's great for Chinese users to have a faster option. I'm wondering how reliable it would be to test via ping instead of requests?
Ping for Yarn Registry (from Germany) IPv4
PING yarn.npmjs.org (104.16.23.35) 56(84) bytes of data. 64 bytes from 104.16.23.35 (104.16.23.35): icmp_seq=1 ttl=58 time=28.6 ms 64 bytes from 104.16.23.35 (104.16.23.35): icmp_seq=2 ttl=58 time=33.1 ms 64 bytes from 104.16.23.35 (104.16.23.35): icmp_seq=3 ttl=58 time=29.3 ms 64 bytes from 104.16.23.35 (104.16.23.35): icmp_seq=4 ttl=58 time=65.4 ms 64 bytes from 104.16.23.35 (104.16.23.35): icmp_seq=5 ttl=58 time=28.8 ms 64 bytes from 104.16.23.35 (104.16.23.35): icmp_seq=6 ttl=58 time=29.6 ms 64 bytes from 104.16.23.35 (104.16.23.35): icmp_seq=7 ttl=58 time=28.5 ms 64 bytes from 104.16.23.35 (104.16.23.35): icmp_seq=8 ttl=58 time=30.3 ms 64 bytes from 104.16.23.35 (104.16.23.35): icmp_seq=9 ttl=58 time=29.6 ms 64 bytes from 104.16.23.35 (104.16.23.35): icmp_seq=10 ttl=58 time=32.3 ms --- yarn.npmjs.org ping statistics --- 10 packets transmitted, 10 received, 0% packet loss, time 9015ms rtt min/avg/max/mdev = 28.575/33.604/65.499/10.732 ms
Ping for Taobao Registry (from Germany) IPv4
PING registry.npm.taobao.org.w.cdngslb.com (47.246.43.230) 56(84) bytes of data. 64 bytes from 47.246.43.230 (47.246.43.230): icmp_seq=1 ttl=55 time=72.7 ms 64 bytes from 47.246.43.230 (47.246.43.230): icmp_seq=2 ttl=55 time=76.1 ms 64 bytes from 47.246.43.230 (47.246.43.230): icmp_seq=3 ttl=55 time=76.5 ms 64 bytes from 47.246.43.230 (47.246.43.230): icmp_seq=4 ttl=55 time=82.2 ms 64 bytes from 47.246.43.230 (47.246.43.230): icmp_seq=5 ttl=55 time=67.0 ms 64 bytes from 47.246.43.230 (47.246.43.230): icmp_seq=6 ttl=55 time=76.0 ms 64 bytes from 47.246.43.230 (47.246.43.230): icmp_seq=7 ttl=55 time=70.8 ms 64 bytes from 47.246.43.230 (47.246.43.230): icmp_seq=8 ttl=55 time=75.7 ms 64 bytes from 47.246.43.230 (47.246.43.230): icmp_seq=9 ttl=55 time=80.6 ms 64 bytes from 47.246.43.230 (47.246.43.230): icmp_seq=10 ttl=55 time=71.2 ms --- registry.npm.taobao.org.w.cdngslb.com ping statistics --- 10 packets transmitted, 10 received, 0% packet loss, time 9013ms rtt min/avg/max/mdev = 67.054/74.936/82.266/4.362 ms
IPv6 is even faster than IPv4 for yarn, so I forced IPv4 so it's the same version.
Hello,
I opted for the switch but I don't know if that is the cause. But when I run vue create command, it always times out for me. I can't even get started with a project. Below is the screenshot of the timeout.
Can you please tell me how to switch out of taobao registry?

First you can check yarn config get registry
then, you can check  useTaobaoRegistry in the config .vuerc, maybe is located on C:/User/your_name/
.vuerc
{
  "packageManager": "yarn",
  "useTaobaoRegistry": false
}
@gopinav
Yeah deleted the .vuerc file from %USERPROFILE% and FINALLY after half a day, I have a project running. I really don't think the suggestion should be made to use taobao registry. Thanks for your help.
See also https://github.com/vuejs/vue-cli/issues/5261
Yeah, the test implementation is not that reliable.
First you can check
yarn config get registrythen, you can check
useTaobaoRegistryin the config.vuerc, maybe is located onC:/User/your_name/.vuerc
{ "packageManager": "yarn", "useTaobaoRegistry": false }@gopinav
Thanks it helps me ! It was exactly that I was looking for :)
Most helpful comment
First you can check
yarn config get registrythen, you can check
useTaobaoRegistryin the config.vuerc, maybe is located onC:/User/your_name/.vuerc
@gopinav