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

Re: [PATCH v1] refresh_index: remove unnecessary calls to preload_index()

From
Duy Nguyen <pclouds@gmail.com>
Date
Nov 5, 2018, 19:44 UTC
Message-ID
<CACsJy8DTNASgBMaoHJM2dXS5KZ7e-t+k5w-1z7Zb_B8UMpSeVw@mail.gmail.com>
In-Reply-To
<20181105192751.11948-1-peartben@gmail.com>
On Mon, Nov 5, 2018 at 8:30 PM Ben Peart <peartben@gmail.com> wrote:
Show 10 quoted lines
>
> From: Ben Peart <benpeart@microsoft.com>
>
> With refresh_index() learning to utilize preload_index() to speed up its
> operation there is no longer any benefit to having the caller preload the
> index first. Remove those unneeded calls by calling read_index() instead of
> the preload variant.
>
> There is no measurable performance impact of this patch - the 2nd call to
> preload_index() bails out quickly but there is no reason to call it twice.

Obviously correct. It's not shown in the context lines, but there's also a refresh_index() after read_index() in sequencer.c too.

-- 
Duy
Previous: Ben Peart
Message 2 of 2 in “refresh_index: remove unnecessary calls to preload_index()”
  1. refresh_index: remove unnecessary calls to preload_index()Ben Peart, Nov 5, 2018
  2. Duy NguyenNov 5, 2018

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.