git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "ZheNing Hu via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: "Junio C Hamano" <gitster@pobox.com>,
	"Christian Couder" <christian.couder@gmail.com>,
	"Hariom Verma" <hariom18599@gmail.com>,
	"Bagas Sanjaya" <bagasdotme@gmail.com>,
	"Jeff King" <peff@peff.net>,
	"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>,
	"Eric Sunshine" <sunshine@sunshineco.com>,
	"Philip Oakley" <philipoakley@iee.email>,
	"ZheNing Hu" <adlternative@gmail.com>
Subject: [PATCH 0/5] [GSOC] [RFC] ref-filter: performance optimization
Date: Tue, 17 Aug 2021 07:14:44 +0000	[thread overview]
Message-ID: <pull.1020.git.1629184489.gitgitgadget@gmail.com> (raw)

Last time I submitted a very long patch series:
https://lore.kernel.org/git/pull.1016.git.1628842990.gitgitgadget@gmail.com/
My mentor Christian suggested to split the performance optimization part
out, so this patch series used to optimize performance optimization in
ref-filter.

Changes in this patch series:

 1. Skip parse_object_buffer(), which can reduce object content parsing.
 2. Use linked list to record parsing results, which can reduce second
    format string parsing.
 3. Reuse final buffer, which can reduce memcpy();
 4. Add a need_get_object_info flag instead of compare two object_info,
    which can reduce memcmp();
 5. Use ALLOC_ARRAY() instead of CALLOC_ARRAY(), which can reduce memset();

Since the relevant part of git cat-file --batch has been deleted, the
execution time of git for-each-ref is very short, I haven’t added
performance tests yet for git for-each-ref.

ZheNing Hu (5):
  [GSOC] ref-filter: skip parse_object_buffer in some cases
  [GSOC] ref-filter: remove second parsing in format_ref_array_item
  [GSOC] ref-filter: reuse final buffer
  [GSOC] ref-filter: reduce unnecessary object_info comparisons
  [GSOC]: ref-filter: instead CALLOC_ARRAY to ALLOC_ARRAY

 builtin/branch.c       |   2 +
 builtin/for-each-ref.c |   3 +-
 builtin/tag.c          |   2 +
 builtin/verify-tag.c   |   2 +
 ref-filter.c           | 168 ++++++++++++++++++++++++++++++++---------
 ref-filter.h           |  17 ++++-
 6 files changed, 154 insertions(+), 40 deletions(-)


base-commit: f000ecbed922c727382651490e75014f003c89ca
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1020%2Fadlternative%2Fref-filter-opt-perf-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1020/adlternative/ref-filter-opt-perf-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/1020
-- 
gitgitgadget

             reply	other threads:[~2021-08-17  7:15 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-17  7:14 ZheNing Hu via GitGitGadget [this message]
2021-08-17  7:14 ` [PATCH 1/5] [GSOC] ref-filter: skip parse_object_buffer in some cases ZheNing Hu via GitGitGadget
2021-08-17  7:14 ` [PATCH 2/5] [GSOC] ref-filter: remove second parsing in format_ref_array_item ZheNing Hu via GitGitGadget
2021-08-17  7:14 ` [PATCH 3/5] [GSOC] ref-filter: reuse final buffer ZheNing Hu via GitGitGadget
2021-08-17  7:14 ` [PATCH 4/5] [GSOC] ref-filter: reduce unnecessary object_info comparisons ZheNing Hu via GitGitGadget
2021-08-17  7:14 ` [PATCH 5/5] [GSOC]: ref-filter: instead CALLOC_ARRAY to ALLOC_ARRAY ZheNing Hu via GitGitGadget

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=pull.1020.git.1629184489.gitgitgadget@gmail.com \
    --to=gitgitgadget@gmail.com \
    --cc=adlternative@gmail.com \
    --cc=avarab@gmail.com \
    --cc=bagasdotme@gmail.com \
    --cc=christian.couder@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=hariom18599@gmail.com \
    --cc=peff@peff.net \
    --cc=philipoakley@iee.email \
    --cc=sunshine@sunshineco.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).