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

[PATCH 0/4] xdiff: reduce the size of a couple of arrays

From
PWPhillip Wood <phillip.wood123@gmail.com>
Date
Apr 2, 2026, 14:57 UTC
Message-ID
<cover.1775141855.git.phillip.wood@dunelm.org.uk>
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
Next: Phillip Wood
Message 1 of 14 in “xdiff: reduce the size of a couple of arrays”
  1. 0/4 xdiff: reduce the size of a couple of arraysPhillip Wood, Apr 2, 2026
  2. 1/4 xdiff: reduce size of action arraysPhillip Wood, Apr 2, 2026
  3. Junio C HamanoApr 2, 2026
  4. 2/4 xdiff: cleanup xdl_clean_mmatch()Phillip Wood, Apr 2, 2026
  5. Junio C HamanoApr 2, 2026
  6. 3/4 xprepare: simplify error handlingPhillip Wood, Apr 2, 2026
  7. Junio C HamanoApr 2, 2026
  8. 4/4 xdiff: reduce the size of arrayPhillip Wood, Apr 2, 2026
  9. Junio C HamanoApr 2, 2026
  10. 0/4 xdiff: reduce the size of a couple of arraysPhillip Wood, May 4, 2026
  11. 1/4 xdiff: reduce size of action arraysPhillip Wood, May 4, 2026
  12. 2/4 xdiff: cleanup xdl_clean_mmatch()Phillip Wood, May 4, 2026
  13. 3/4 xprepare: simplify error handlingPhillip Wood, May 4, 2026
  14. 4/4 xdiff: reduce the size of arrayPhillip Wood, May 4, 2026

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.