Skip to content

Improve write_archive performance#1183

Merged
jdavid merged 1 commit into
libgit2:masterfrom
xMez:better-archive-performance
Dec 10, 2022
Merged

Improve write_archive performance#1183
jdavid merged 1 commit into
libgit2:masterfrom
xMez:better-archive-performance

Conversation

@xMez

@xMez xMez commented Dec 8, 2022

Copy link
Copy Markdown
Contributor

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

jdavid commented Dec 10, 2022

Copy link
Copy Markdown
Member

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.

2 participants