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

Cloning large repos over HTTP is very slow #672

Closed
royneary opened this issue Nov 25, 2018 · 3 comments
Closed

Cloning large repos over HTTP is very slow #672

royneary opened this issue Nov 25, 2018 · 3 comments

Comments

@royneary
Copy link

As mentioned in jonashaag/klaus#230 I tried to clone a large repo over HTTP using klaus and ran into a timeout.

Now I tried to clone using dulwich web-daemon directly and cloning the nixpkgs repo from localhost took 36 minutes. Here's the console output:

$ dulwich web-daemon
2018-11-25 11:59:30,155 INFO: Sending capabilities: [b'multi_ack_detailed', b'multi_ack', b'side-band-64k', b'thin-pack', b'ofs-delta', b'no-progress', b'include-tag', b'shallow', b'no-done', b'symref=refs/remotes/origin/HEAD:refs/remotes/origin/master', b'symref=HEAD:refs/heads/master']
2018-11-25 11:59:30,190 INFO: "GET /home/christian/projects/nixpkgs/info/refs?service=git-upload-pack HTTP/1.1" 200 20916
2018-11-25 11:59:30,195 INFO: Handling service request for git-upload-pack
2018-11-25 11:59:30,210 INFO: Client capabilities: [b'multi_ack_detailed', b'no-done', b'side-band-64k', b'thin-pack', b'ofs-delta']
2018-11-25 12:35:28,218 INFO: "POST /home/christian/projects/nixpkgs/git-upload-pack HTTP/1.1" 200 7810989836

The git client displayed the remote: dul-daemon says what line after around 10 minutes. The client side output:

git clone http://localhost:8000/home/christian/projects/nixpkgs
Cloning into 'nixpkgs'...
remote: dul-daemon says what
remote: counting objects: 1315755, done.
Receiving objects: 100% (1315755/1315755), 7.26 GiB | 4.44 MiB/s, done.
remote: how was that, then?
Checking out files: 100% (17682/17682), done.

This was done on a machine with a Core i5-6300HQ, I didn't bother to wait for it on my server (an old Atom N270). That's definitely not viable for web applications.

I'm using dulwich 0.19.6.

@jelmer
Copy link
Owner

jelmer commented Nov 25, 2018 via email

@royneary
Copy link
Author

Are you sure you're using dulwich 0.19.6? That message is gone in 0.19.6.

That's what my package manager (nix) says. The package definition says, it's using 0.19.6 from Pypi.

@jelmer
Copy link
Owner

jelmer commented Jan 15, 2023

This should be fixed in 0.21.0 (or at least significantly better). We now reuse existing deltas.

@jelmer jelmer closed this as completed Jan 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants