Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pack-objects: thread the path-based compression
Adapting the implementation of ll_find_deltas(), create a threaded version of the --path-walk compression step in 'git pack-objects'. This involves adding a 'regions' member to the thread_params struct, allowing each thread to own a section of paths. We can simplify the way jobs are split because there is no value in extending the batch based on name-hash the way sections of the object entry array are attempted to be grouped. We re-use the 'list_size' and 'remaining' items for the purpose of borrowing work in progress from other "victim" threads when a thread has finished its batch of work more quickly. Using the Git repository as a test repo, the p5313 performance test shows that the resulting size of the repo is the same, but the threaded implementation gives gains of varying degrees depending on the number of objects being packed. (This was tested on a 16-core machine.) Test HEAD~1 HEAD --------------------------------------------------------------- 5313.2: thin pack 0.01 0.01 +0.0% 5313.4: thin pack with --path-walk 0.01 0.01 +0.0% 5313.6: big pack 2.54 2.60 +2.4% 5313.8: big pack with --path-walk 4.70 3.09 -34.3% 5313.10: repack 28.75 28.55 -0.7% 5313.12: repack with --path-walk 108.55 46.14 -57.5% On the microsoft/fluentui repo, where the --path-walk feature has been shown to be more effective in space savings, we get these results: Test HEAD~1 HEAD ---------------------------------------------------------------- 5313.2: thin pack 0.39 0.40 +2.6% 5313.4: thin pack with --path-walk 0.08 0.07 -12.5% 5313.6: big pack 4.15 4.15 +0.0% 5313.8: big pack with --path-walk 6.41 3.21 -49.9% 5313.10: repack 90.69 90.83 +0.2% 5313.12: repack with --path-walk 108.23 49.09 -54.6% Signed-off-by: Derrick Stolee <stolee@gmail.com>
- Loading branch information