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

Re: [PATCH] use a hashmap to make remotes faster

From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Date
Jul 29, 2014, 07:57 UTC
Message-ID
<vpqoaw8ha12.fsf@anie.imag.fr>
In-Reply-To
<305063.319715799-sendEmail@debian>

"patrick.reynolds@github.com" <patrick.reynolds@github.com> writes: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

It seems you mixed your name and email address in your config file. I guess your name is "Patrick Reynolds", not "patrick.reynolds@github.com".

> Remotes are stored as an array, so looking one up or adding one without
> duplication is an O(n) operation.  Reading an entire config file full of
> remotes is O(n^2) in the number of remotes.  For a repository with tens of
> thousands of remotes, the running time can hit multiple minutes.

Just being curious: in which senario do you have tens of thousands of remotes?

(not an objection, it's a good thing anyway)
> +static inline void init_remotes_hash()
static inline void init_remotes_hash(void)
Not a detailed review, but the patch sounds good other than that.
-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Previous: patrick.reynolds@github.comNext: Jeff King
Message 2 of 3 in “use a hashmap to make remotes faster”
  1. use a hashmap to make remotes fasterpatrick.reynolds@github.com, Jul 29, 2014
  2. Matthieu MoyJul 29, 2014
  3. Jeff KingJul 29, 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.