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

Should object repacking only update server-info for packs instead of doing it for refs?

From
Martin Fick <mfick@nvidia.com>
Date
Oct 14, 2024, 20:07 UTC
Message-ID
<LV8PR12MB9407CB282D1FD4998C659D29C2442@LV8PR12MB9407.namprd12.prod.outlook.com>
I have been experimenting with trying to run git geometric repacking after every push on our servers and have noticed that even a NOOP geometric repack takes approximately 30s on one of my large repositories. Further investigation determined that it was the update-server-info call that was taking that 30s, so running repacking with the -n instead only takes 6ms in this case! I dug a bit deeper and found that it was the update_info_refs() call that takes all the time. This seemed a bit off to me. Yes, it makes sense that would be slow, I have almost 2Mrefs, but I had to ask myself, why is this being done from git repack? It seems counterintuitive that an operation designed to repack objects would be performing maintenance of any sort on refs? Should this be improved somehow? Should there be a -packs and a -refs switch to git update-server-info, and should git repack call it with -packs? Should git pack-refs be calling git update-server-info with -refs instead?
Thanks,
-Martin
Next: Luca Milanesio
Message 1 of 7 in “Should object repacking only update server-info for packs instead of doing it for refs?”
  1. Martin FickOct 14, 2024
  2. Luca MilanesioOct 14, 2024
  3. Taylor BlauOct 14, 2024
  4. Patrick SteinhardtOct 15, 2024
  5. Luca MilanesioOct 15, 2024
  6. Patrick SteinhardtOct 15, 2024
  7. Taylor BlauOct 15, 2024

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.