HDiffPatch icon indicating copy to clipboard operation
HDiffPatch copied to clipboard

greatly optimize memory require size for diff -m mode;

Open sisong opened this issue 4 months ago • 0 comments

now -m diff:

  1. load old & new's data all to memory
  2. get cover lines by big match block
  3. remove some old & new's data by matched cover lines
  4. remaining datas, get cover lines by sstring(byte by byte) match
  5. merge the results(cover lines) of two match

new -m diff:

  1. now old & new only load as stream
  2. get cover lines by small or big match block (maybe slow)
  3. obtain the main matching path by analyzing the cover lines(The most difficult point determines whether the entire project can be completed or not.)
  4. remove some old & new's area by big matched cover lines (optional)
  5. according matching path, old data clip to multiple steps by limit size
  6. load every step data of old & new into memory, get cover lines by sstring(byte by byte) match
  7. merge the results(cover lines) of two match

sisong avatar Aug 30 '25 03:08 sisong