Git development
 help / color / mirror / Atom feed
From: Phillip Wood <phillip.wood123@gmail.com>
To: git@vger.kernel.org
Cc: Ezekiel Newren <ezekielnewren@gmail.com>
Subject: [PATCH 0/4] xdiff: reduce the size of a couple of arrays
Date: Thu,  2 Apr 2026 15:57:40 +0100	[thread overview]
Message-ID: <cover.1775141855.git.phillip.wood@dunelm.org.uk> (raw)

From: Phillip Wood <phillip.wood@dunelm.org.uk>

When the myers algorithm is selected the input files are pre-processed
to remove any common prefix and suffix. There are a couple of places
where we allocate arrays large enough to hold the whole file when
they only need to be big enough to hold the remaining lines after the
common prefix and suffix have been removed. This series adjusts those
allocations to avoid allocating space for the common lines.

These patches are based on 'en/xdiff-cleanup-3'

Base-Commit: 7ff1460b62ffc8f18a5478be5aba9d4599afb635
Published-As: https://github.com/phillipwood/git/releases/tag/pw%2Fxdiff-reduce-array-sizes%2Fv1
View-Changes-At: https://github.com/phillipwood/git/compare/7ff1460b6...a3438dc09
Fetch-It-Via: git fetch https://github.com/phillipwood/git pw/xdiff-reduce-array-sizes/v1


Phillip Wood (4):
  xdiff: reduce size of action arrays
  xdiff: cleanup xdl_clean_mmatch()
  xprepare: simplify error handling
  xdiff: reduce the size of array

 xdiff/xprepare.c | 46 ++++++++++++++++++++++------------------------
 1 file changed, 22 insertions(+), 24 deletions(-)

-- 
2.52.0.362.g884e03848a9.dirty


             reply	other threads:[~2026-04-02 14:58 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-02 14:57 Phillip Wood [this message]
2026-04-02 14:57 ` [PATCH 1/4] xdiff: reduce size of action arrays Phillip Wood
2026-04-02 19:19   ` Junio C Hamano
2026-04-02 14:57 ` [PATCH 2/4] xdiff: cleanup xdl_clean_mmatch() Phillip Wood
2026-04-02 19:20   ` Junio C Hamano
2026-04-02 14:57 ` [PATCH 3/4] xprepare: simplify error handling Phillip Wood
2026-04-02 19:24   ` Junio C Hamano
2026-04-02 14:57 ` [PATCH 4/4] xdiff: reduce the size of array Phillip Wood
2026-04-02 19:44   ` Junio C Hamano
2026-05-04 14:06 ` [PATCH v2 0/4] xdiff: reduce the size of a couple of arrays Phillip Wood
2026-05-04 14:06   ` [PATCH v2 1/4] xdiff: reduce size of action arrays Phillip Wood
2026-05-04 14:06   ` [PATCH v2 2/4] xdiff: cleanup xdl_clean_mmatch() Phillip Wood
2026-05-04 14:06   ` [PATCH v2 3/4] xprepare: simplify error handling Phillip Wood
2026-05-04 14:06   ` [PATCH v2 4/4] xdiff: reduce the size of array Phillip Wood

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

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

  git send-email \
    --in-reply-to=cover.1775141855.git.phillip.wood@dunelm.org.uk \
    --to=phillip.wood123@gmail.com \
    --cc=ezekielnewren@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=phillip.wood@dunelm.org.uk \
    /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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox