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

[PATCH RFC v2 0/4] ref-filter: start using oid_object_info

From
Оля Тележная <olyatelezhnaya@gmail.com>
Date
May 18, 2018, 08:19 UTC
Message-ID
<CAL21Bmncoc0byRWdOdk89fza4y8Lo0HbNp-gsMEFRigGGEwD2Q@mail.gmail.com>

Hello, Discussion starts here: [1], [2].

Updates:

I fixed memory leaks, now we use data from oid_object_info() OR from grab_commom_values() - not both as it was before.

I added support for "%(objectsize:disk)" atom (with tests) and for "%(deltabase)" atom (without tests yet). I didn't support "%(*objectsize:disk)" and "%(*deltabase)" because I can't see the possibility to fill these fields at the same time with other processes. I really want to discuss this moment with someone. The best idea that I have is to fully change grab_common_values() function so that it would collect and fill all info from oid_object_info_extended(), and we will invoke it before we actually get and parse full object.

I am not sure with this proposed solution at all: we would still have the scenario when we call both oid_object_info_extended() and get_object(), it means the performance will be worse in some cases. I don't know if it's crucial.

By the way, do we have an official way to measure performance?

I didn't add tests for %(deltabase) atom because I am not sure that it has sense for for-each-ref at all: I have a guess that I added this atom only for future using in cat-file command, and also for deref option %(*deltabase).

I was also thinking about adding new parameter to atom, something like enum "need oid_object_info", "need get_object" etc, so that we could collect all needed data in a shortest way. The problem is that the code will be even more complicated, and I am not sure our goal worth it. And, anyway, there would be the scenario when we have to call both oid_object_info_extended() and get_object(): for example, if we have format="%(objectsize:disk) %(author)".

Thanks a lot, Waiting for any ideas/comments!

[1] https://public-inbox.org/git/CAL21Bm=6Z54-zsUq0DJqmqhSciHCDLUNXR8inDMAd-b-=QJjcA@mail.gmail.com/ [2] https://public-inbox.org/git/xmqq8t8la81a.fsf@gitster-ct.c.googlers.com/

Message 1 of 1 in “ref-filter: start using oid_object_info”
  1. 0/4 ref-filter: start using oid_object_infoОля Тележная, May 18, 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.