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

cmd/go: go get takes very long time on projects with a lot of history #18423

Open
akamensky opened this Issue Dec 24, 2016 · 6 comments

Comments

Projects
None yet
4 participants
@akamensky

akamensky commented Dec 24, 2016

What version of Go are you using (go version)?

1.7.4 darwin

What did you do?

go get guthub.com/andlabs/ui

What did you expect to see?

Since we only need/expect latest version the shallow copy of repository is expected.

What did you see instead?

The full git clone which since there are binary files checked in and they were updated multiple times takes ~30 minutes to execute.

@minux

This comment has been minimized.

Member

minux commented Dec 24, 2016

@akamensky

This comment has been minimized.

akamensky commented Dec 24, 2016

Make an optional feature enabled command line argument then maybe? Something like '--shallow' that would call git clone --depth 1?

@akamensky

This comment has been minimized.

akamensky commented Dec 24, 2016

That project is just one of many with which I see that. Some other projects may take unbearably long.

Right now I just resort to doing a "git clone --depth 1 https://www.github.com/user/project $(GOPATH)/src/github.com/user/project/" which is rather annoying if there are multiple dependencies to fetch

@cznic

This comment has been minimized.

Contributor

cznic commented Dec 25, 2016

jnml@4670:~/src/github.com$ rm -rf andlabs/
jnml@4670:~/src/github.com$ time git clone https://github.com/andlabs/ui.git
Cloning into 'ui'...
remote: Counting objects: 12567, done.
remote: Total 12567 (delta 0), reused 0 (delta 0), pack-reused 12567
Receiving objects: 100% (12567/12567), 20.89 MiB | 4.69 MiB/s, done.
Resolving deltas: 100% (8721/8721), done.
Checking connectivity... done.

real	0m5.585s
user	0m1.068s
sys	0m0.224s
jnml@4670:~/src/github.com$ 

Do you use Windows+antivirus perhaps?

@akamensky

This comment has been minimized.

akamensky commented Dec 25, 2016

No. I am using Mac/Linux and I am located in PRC at the moment. From here Github is accessible but rather slow.

And this isn't the only place this happens. Same is half of South East Asia and Oceania, except Japan and Korea perhaps.

@rsc

This comment has been minimized.

Contributor

rsc commented Jan 4, 2017

Related to #13078. I don't have a quick fix for you. I hope the long-term package management story will solve this, by not requiring full Git checkouts. For now I will leave the issue open for tracking purposes.

@rsc rsc added this to the Unplanned milestone Jan 4, 2017

@rsc rsc changed the title from [FEATURE REQ] go get takes very long time on projects with a lot of history to cmd/go: go get takes very long time on projects with a lot of history Jan 4, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment