mirror of
https://github.com/python/cpython.git
synced 2024-11-30 18:51:15 +01:00
2b2d607095
Tarfile in the default write mode spends much of its time resolving UIDs into usernames and GIDs into group names. By caching these mappings, a significant speedup can be achieved. In my simple benchmark[1], this extra caching speeds up tarfile by 8x. [1] https://gist.github.com/jforberg/86af759c796199740c31547ae828aef2 --------- Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com> Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com> Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
3 lines
101 B
ReStructuredText
3 lines
101 B
ReStructuredText
Improve the performance of :mod:`tarfile` when writing files, by caching user names
|
|
and group names.
|