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

Dulwich does not report progress during actual download #1121

Open
danchr opened this issue Jan 16, 2023 · 1 comment
Open

Dulwich does not report progress during actual download #1121

danchr opened this issue Jan 16, 2023 · 1 comment

Comments

@danchr
Copy link
Contributor

danchr commented Jan 16, 2023

When cloning a large repository, Git will show you progress lines like this:

Receiving objects:  49% (196978/395839), 148.99 MiB | 21.35 MiB/s

By comparison, Dulwich is silent and does not output anything after the initial:

Compressing objects: 100% (36222/36222), done.
@danchr danchr changed the title Dulwich does not report progress Dulwich does not report progress during actual download Jan 16, 2023
@jelmer
Copy link
Owner

jelmer commented Jan 16, 2023

0.21 should be better in terms of reporting progress, though it doesn't report during the receiving phase either.

Dulwich currently writes into a SpooledTemporaryFile first and then parses the file it's written. Ideally we'd be parsing while receiving (and writing to disk as bytes come in), and then we could provide a progress indicator. I did do some experimentation and that suggested there isn't a massive performance improvement to be gained from inlining this, though I'm sure there are some benefits.

The problem here is that the interface for verifying and copying a pack file expects to read from a file object, and the interface that receives a pack from a remote server calls a callback. We should do the refactoring to have those fit better onto each other; patches welcome :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants