libgit2 / pygit2

Python bindings for libgit2
https://www.pygit2.org/
Other
1.58k stars 382 forks source link

Improve write_archive performance #1183

Closed xMez closed 1 year ago

xMez commented 1 year ago

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 commented 1 year ago

Thanks