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

Re: [PATCH] defer expensive load_ref_decorations until needed

From
Phil Hord <phil.hord@gmail.com>
Date
Nov 22, 2017, 17:45 UTC
Message-ID
<CABURp0rNfdXaXH-meRvM+mjf+ucHKfePjDU7ZGKt0ug3wOanhA@mail.gmail.com>
In-Reply-To
<xmqqk1yiu9fo.fsf@gitster.mtv.corp.google.com>
On Tue, Nov 21, 2017, Junio C Hamano <gitster@pobox.com> wrote:
Show 7 quoted lines
> Junio C Hamano <gitster@pobox.com> writes:
>
> I am not sure if "maybe_" is a good name here, though.  If anything,
> you are making the semantics of "load_ref_decorations()" to "maybe"
> (but I do not suggest renaming that one).
>
> How about calling it to load_ref_decorations_lazily() or something?

I groped about for something conventional, but "..._gently" didn't fit the bill, so I went with "maybe". I like "lazily" better for this case. I will change it for v2.

Show 12 quoted lines
>> Other than that, I like what this patch attempts to do.  A nicely
>> identified low-hanging fruit ;-).
>
> Having said that, this will have a bad interaction with another
> topic in flight: <20171121213341.13939-1-rafa.almas@gmail.com>
>
> Perhaps this should wait until the other topic lands and stabilizes.
> We'd need to rethink if the approach taken by this patch, i.e. to
> still pass the info to load() but holding onto it until the time
> lazy_load() actually uses it, is a sensible way forward, or we would
> want to change the calling convention to help making it easier to
> implement the lazy loading.

I noticed that after just after cleaning this one up, but didn't look closely yet. I'll hold this in my local queue until ra lands.

P
Previous: Junio C HamanoNext: Jeff King
Message 4 of 9 in “defer expensive load_ref_decorations until needed”
  1. defer expensive load_ref_decorations until neededPhil Hord, Nov 21, 2017
  2. Junio C HamanoNov 22, 2017
  3. Junio C HamanoNov 22, 2017
  4. Phil HordNov 22, 2017
  5. Jeff KingNov 22, 2017
  6. Phil HordNov 22, 2017
  7. Jeff KingNov 22, 2017
  8. Junio C HamanoNov 23, 2017
  9. Jeff KingNov 23, 2017

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.