Modernize reviewboard.diffviewer.myersdiff.
Review Request #14504 — Created July 11, 2025 and updated
The Myers diff implementation is some of the oldest, most opaque code we
have. This change fixes things up as best I can.
Ran unit tests.
Summary | ID |
---|---|
9014eac91e2dc8f53c0f2c2bb704fe2d4d0265bb |
Description | From | Last Updated |
---|---|---|
We access a_data and b_data 3 times, so let's just pull it out into a local variable. Not a hot … |
|
|
Let's pull these out into local variables, since we access these a lot. |
|
|
Can you add Args and Returns while here? |
|
|
Since we're accessing this every loop, let's pull ignore_space out. |
|
|
Let's also do the same with these and everything else we're accessing from self a lot. |
|
|
Small tweak: We could compare v > best first, since it avoids the math and calls, and might faster in … |
|
|
Let's pull a_data and b_data, out, since we use these a lot. |
|
|
"Check" |
|
-
-
We access
a_data
andb_data
3 times, so let's just pull it out into a local variable. Not a hot path, but any wins out of diff code would be good. -
-
-
-
-
Small tweak: We could compare
v > best
first, since it avoids the math and calls, and might faster in the false case. -
-
Hmm,
/
vs.//
changed and we never updated this, so I know we're now going back to the original behavior, but I wonder if we'll see any subtle changes from this -
- Commits:
-
Summary ID de44b56e96ff89ca516da7b35474e6a9963ba271 9014eac91e2dc8f53c0f2c2bb704fe2d4d0265bb - Diff:
-
Revision 2 (+1012 -302)