Libxdiff as diffengine?

Discussion about WinMerge 3 development.

Libxdiff as diffengine?

Postby kimmov » Fri Jun 11, 2010 12:34 pm

I've done earlier (sorry forgot to report about that) some experimenting using LibXDiff. It looks very interesting as diffengine for WinMerge 3. My experimenting code is available as Mercurial repository at BB: libxdiff-testing.

Some positive points about using LibXDiff:
  • active community / development (part of Git)
  • optimized (Git developers care a lot about speed!)
  • offers stable API
  • API wants memory buffers
  • (I think) pretty easy partial file compares
  • patch creation / applying
Some negative points about using LibXDiff:
  • no diffutils-like ignore options
  • generated patches in "git" format
  • API might be a bit tricky
  • API manages its own buffers for data - we easily end up with the existing problem of buffering same data many times
So it is not all joy and there are some negative points too. It is in no way "diffutils replacement" and we need to re-think how we do many things. But again we aren't limited to diffutils doing certain ignoring etc but we can do whatever ignoring/filtering we like. So the flexibility is one big advantage in my opinion.

If I have time I may try to do very simple folder compare program in next weeks. Just check if files are identical or not and offer very simple GUI for that. With LibXDiff and Qt this is few days of work.

One big thing is ignoring of text case and whitespace which is what current WinMerge users are so used to. There is no such options in LibXDiff. But as mentioned already above we just need to implement them ourselves. I think this is actually an advantage. There is lot of confusion about how current whitespace ignoring works. So we can implement a bit more sane whitespace ignore from user point of view. Of course it must be some kind of filtering layer orver LibXDiff allowing line filtering and whatever. But in principle I think it will be a lot easier than with diffutils.
Posts: 562
Joined: Thu Sep 11, 2008 8:51 pm
Location: Finland

Return to WinMerge 3

Who is online

Users browsing this forum: No registered users and 1 guest