Commit Graph

14 Commits

Author SHA1 Message Date
pancake
f5b255603a Bring back the old buffer_distance algorithm, make levenstein optional 2016-09-21 12:07:44 +02:00
Álvaro Felipe Melchor
8a0b1183c7 fix crashes in radiff 2016-07-26 22:34:00 +02:00
Álvaro Felipe Melchor
8ad4d74316 fix off by one when diffing 2016-07-17 12:10:23 +02:00
NikolaiHampton
392dd94bf7 Optimisation of Levenshtein calc in radiff2 -s
- Optimised the distance calculation for radiff -s
- Fixed a bug in radiff.c that where verbose was always true.
- Added check that calloc() was successful.
- Shuffled code around to minimise use of free()
- Added some comments.

Speeds up the radiff2 statistical diff. Drastically reduced the ‘edit
distance search space’ by ignoring ranges that can’t affect the edit
distance. Improves search for similar files (common use case?), can
reduce the search space significantly:

One file tested went from two unknown versions of httpd, on MacBook has
a 28 hours processing time, down to ~13 minutes. Results will vary based
on file differences the more similar the files, the faster it'll run.
2016-07-17 12:10:20 +02:00
pancake
d3394d5a7a Fix latest 28 COVs 2016-06-02 03:19:31 +02:00
NikolaiHampton
2c50dd0c59 Memory efficient implemenation of Levenshtein Distance for radiff2 (add -V)
Implemented the iterative two matrix row version from here: https://en.wikipedia.org/wiki/Levenshtein_distance
and here: http://www.codeproject.com/Articles/13525/Fast-memory-efficient-Levenshtein-algorithm

Memory usage was originally 200Gig for a couple of 100K files ~(sizeA*sizeB), now about ~(sizeB*2)...
2016-05-26 11:03:01 +02:00
Sven Steinbauer
547f8bbc5c Infer fixes Round 2 (#4993) 2016-05-24 22:22:15 +02:00
pancake
895a966884 Do not diff function strings, increase memlimit 2016-03-22 01:31:10 +01:00
Pavel Borzenkov
f1a9852362 Fix 'radiff2 -g' crash
No all users of r_diff_buffers_distance() pass a pointer for 'distance'
argument. Check for NULL before assigning a value to it.

Signed-off-by: Pavel Borzenkov <pavel.borzenkov@gmail.com>
2016-01-22 15:17:22 +01:00
pancake
fea5e916a6 Fix #3861 - radiff2 -s is no longer killing 2016-01-11 03:18:43 +01:00
jvoisin
9a7bf7751b Coverifix 2015-06-19 21:30:57 +02:00
jvoisin
6ea8a866f6 Fix two coverities 2015-06-12 23:19:14 +02:00
pancake
a093958b6d Release 0.9.9 - codename AlmostThere 2015-06-05 04:07:13 +02:00
pancake
2970b9817b Fix #2674 - merge diff into util 2015-06-02 01:35:12 +02:00