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

Improve write_archive performance #1183

Merged
merged 1 commit into from
Dec 10, 2022

Conversation

xMez
Copy link
Contributor

@xMez xMez commented Dec 8, 2022

Accessing each item in the tree during this loop slows down the write_archive method significantly when dealing with repositories with a large nr of files.

On a repository of ~5000 files the archiving time went from 13s to 0.5s.
From what I can tell when testing tree[entry.path].filemode and entry.mode are the same.

@jdavid jdavid merged commit 673fda4 into libgit2:master Dec 10, 2022
@jdavid
Copy link
Member

jdavid commented Dec 10, 2022

Thanks

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

Successfully merging this pull request may close these issues.

None yet

2 participants