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

Re: What's cooking in git.git (Jul 2018, #03; Wed, 25)

From
Christian Couder <christian.couder@gmail.com>
Date
Aug 2, 2018, 12:41 UTC
Message-ID
<CAP8UFD0yWYvrbgtKjUs8oVks36Rp4qpfGAj3tambixSeC+-_1w@mail.gmail.com>
In-Reply-To
<xmqqpnzaq6jf.fsf@gitster-ct.c.googlers.com>
On Thu, Jul 26, 2018 at 6:57 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 23 quoted lines
> Оля Тележная  <olyatelezhnaya@gmail.com> writes:
>
>> 2018-07-26 1:13 GMT+03:00 Junio C Hamano <gitster@pobox.com>:
>>>
>>> * ot/ref-filter-object-info (2018-07-17) 5 commits
>>>  - ref-filter: use oid_object_info() to get object
>>>  - ref-filter: merge get_obj and get_object
>>>  - ref-filter: initialize eaten variable
>>>  - ref-filter: fill empty fields with empty values
>>>  - ref-filter: add info_source to valid_atom
>>>
>>>  A few atoms like %(objecttype) and %(objectsize) in the format
>>>  specifier of "for-each-ref --format=<format>" can be filled without
>>>  getting the full contents of the object, but just with the object
>>>  header.  These cases have been optimzied by calling
>>>  oid_object_info() API.
>>>
>>>  What's the doneness of this one?
>>
>> It is ready. Thanks.
>
> Thanks, the question was meant more to the reviewers and mentors
> than the original author, though ;-)
I just tested this patch series on git.git on my laptop with the following:
$ time git for-each-ref --format='%(objecttype)' >/dev/null
and the best I can get without it is:

real 0m0,038s user 0m0,034s sys 0m0,004s

while with it I can get:

real 0m0,017s user 0m0,016s sys 0m0,000s

The results are similar with --format='%(objectsize)'.
So I think it is a nice improvement.

Looking at the code of the patches again, I can't see any simple way to improve on the way it is done.

Thanks, Christian.

Previous: Junio C HamanoNext: Junio C Hamano
Message 11 of 25 in “What's cooking in git.git (Jul 2018, #03; Wed, 25)”
  1. Junio C HamanoJul 25, 2018
  2. Stefan BellerJul 25, 2018
  3. Junio C HamanoJul 25, 2018
  4. Junio C HamanoJul 26, 2018
  5. Junio C HamanoJul 26, 2018
  6. Junio C HamanoJul 25, 2018
  7. Junio C HamanoJul 25, 2018
  8. Junio C HamanoJul 26, 2018
  9. Оля ТележнаяJul 26, 2018
  10. Junio C HamanoJul 26, 2018
  11. Christian CouderAug 2, 2018
  12. Junio C HamanoAug 2, 2018
  13. Jeff KingJul 26, 2018
  14. Junio C HamanoJul 26, 2018
  15. Jeff KingJul 26, 2018
  16. Ævar Arnfjörð BjarmasonJul 27, 2018
  17. Junio C HamanoJul 27, 2018
  18. range-diff, was Re: What's cooking in git.git (Jul 2018, #03; Wed, 25)Johannes Schindelin, Jul 30, 2018
  19. Junio C HamanoJul 30, 2018
  20. Johannes SchindelinAug 1, 2018
  21. Junio C HamanoAug 1, 2018
  22. ds/reachable (was Re: What's cooking in git.git (Jul 2018, #03; Wed, 25))Derrick Stolee, Aug 1, 2018
  23. Junio C HamanoAug 1, 2018
  24. ds/multi-pack-index (was Re: What's cooking in git.git (Jul 2018, #03; Wed, 25))Derrick Stolee, Aug 1, 2018
  25. Junio C HamanoAug 1, 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.