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

[PATCH 0/1] ls-refs.c: minimize number of refs visited

From
Jacob Vosmaer <jacob@gitlab.com>
Date
Jan 19, 2021, 14:42 UTC
Message-ID
<20210119144251.27924-1-jacob@gitlab.com>

The back story of this patch is in https://gitlab.com/gitlab-com/gl-infra/scalability/-/issues/746; it comes down to: we have a repo with 500,000 refs of which only 50,000 are visible. Having ls-refs iterate through all the refs adds considerable overhead.

This patch reduces the number of refs visited by replacing one ref walk over refs/ with multiple ref walks over the prefixes the user requested via ref-prefix. In the case the user did not use ref-prefix we fall back to the walk over all of refs/.

Jacob Vosmaer (1):
  ls-refs.c: minimize number of refs visited
 ls-refs.c | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 62 insertions(+), 1 deletion(-)
-- 
2.30.0
Next: Jacob Vosmaer
Message 1 of 8 in “ls-refs.c: minimize number of refs visited”
  1. 0/1 ls-refs.c: minimize number of refs visitedJacob Vosmaer, Jan 19, 2021
  2. 1/1 ls-refs.c: minimize number of refs visitedJacob Vosmaer, Jan 19, 2021
  3. Taylor BlauJan 19, 2021
  4. Jeff KingJan 19, 2021
  5. Taylor BlauJan 19, 2021
  6. Jeff KingJan 19, 2021
  7. Jacob VosmaerJan 20, 2021
  8. Jacob VosmaerJan 20, 2021

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.