HomePhabricator

basestore: remove empty directories recursively during clean up

Authored by singhsrb.

Description

basestore: remove empty directories recursively during clean up

Summary:
The cleanup method right now does not clean up all the directories that are
empty. This leads to a situation where we can have a large number of empty
directories for the next repack which is unnecessary. This commit removes all
the empty directories in the cache directory during the clean up.

Test Plan:

  • Ran all the tests.
  • Removed about 220k empty directories from the local cache. Running time of hg repack --incremental went from 3-4s every time to around 5s for the first time (because of deleting the empty directories) and ~200 milliseconds every subsequent time. Note that there was nothing to repack during the repack operation.

Reviewers: #fbhgext, quark

Reviewed By: #fbhgext, quark

Subscribers: quark

Differential Revision: https://phab.mercurial-scm.org/D1561

Details

Committed
singhsrbNov 30 2017, 6:41 PM
Reviewer
Restricted Project
Differential Revision
D1561: basestore: remove empty directories recursively during clean up
Parents
rFBHGX9322b1a81e81: check-config: actually fix conflicted configs
Branches
Unknown
Tags
Unknown