git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 0/2] remote: optimize rm/prune ref deletion

From
Jens Lindström <jl@opera.com>
Date
May 20, 2014, 10:34 UTC
Message-ID
<537B2FA4.7020001@opera.com>

At work, we have some shared repositories with far too many refs in them, which causes various issues, performance and otherwise. We plan to move most of the refs out of them, but for that to help users that have already fetched all the refs into their local repositories, those users should want to run 'git remote prune'.

It turns out that 'git remote prune' (and also 'git remote rm') has its own rather severe performance issues relating to removing the obsolete refs from the local repository, which I've addressed in the following patches. The performance improves from many CPU minutes (long enough that I could never be bothered to let it run to completion) to around a few seconds, when removing ~15000 refs.

Jens Lindström (2):
  remote: defer repacking packed-refs when deleting refs
  remote prune: optimize "dangling symref" check/warning
 builtin/remote.c | 25 +++++++++++++++++++++----
 refs.c           | 34 +++++++++++++++++++++++++++-------
 refs.h           |  4 ++++
 3 files changed, 52 insertions(+), 11 deletions(-)

-- 1.9.1

Next: Jens Lindström
Message 1 of 16 in “remote: optimize rm/prune ref deletion”
  1. 0/2 remote: optimize rm/prune ref deletionJens Lindström, May 20, 2014
  2. 1/2 remote: defer repacking packed-refs when deleting refsJens Lindström, May 20, 2014
  3. Junio C HamanoMay 20, 2014
  4. Junio C HamanoMay 20, 2014
  5. Jens LindströmMay 23, 2014
  6. Junio C HamanoMay 23, 2014
  7. Jens LindströmMay 24, 2014
  8. Junio C HamanoMay 27, 2014
  9. 2/2 remote prune: optimize "dangling symref" check/warningJens Lindström, May 20, 2014
  10. 0/3 remote: optimize rm/prune ref deletionJens Lindström, May 23, 2014
  11. 1/3 remote rm: delete remote configuration as the lastJens Lindström, May 23, 2014
  12. Junio C HamanoMay 23, 2014
  13. 2/3 remote: repack packed-refs once when deleting multiple refsJens Lindström, May 23, 2014
  14. Junio C HamanoMay 23, 2014
  15. Junio C HamanoMay 23, 2014
  16. 3/3 remote prune: optimize "dangling symref" check/warningJens Lindström, May 23, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.