Fossil SCM

In the diff generator, allow optimial-LCS runs to be 4 times as large. Fix for the issue reported at [forum:/forumpost/298bcd17cd|forum post 298bcd17cd]

drh 2021-12-20 16:10 trunk
Commit 7a93baffa230c9b229d0b68b44713dfa50cf1a0dc885f7d22b3a7ed0e15181ca
1 file changed +1 -1
+1 -1
--- src/diff.c
+++ src/diff.c
@@ -2348,11 +2348,11 @@
23482348
iSYp = iSY;
23492349
iEXp = iEX;
23502350
iEYp = iEY;
23512351
}
23522352
}
2353
- if( iSXb==iEXb && (sqlite3_int64)(iE1-iS1)*(iE2-iS2)<400 ){
2353
+ if( iSXb==iEXb && (sqlite3_int64)(iE1-iS1)*(iE2-iS2)<1600 ){
23542354
/* If no common sequence is found using the hashing heuristic and
23552355
** the input is not too big, use the expensive exact solution */
23562356
optimalLCS(p, iS1, iE1, iS2, iE2, piSX, piEX, piSY, piEY);
23572357
}else{
23582358
*piSX = iSXb;
23592359
--- src/diff.c
+++ src/diff.c
@@ -2348,11 +2348,11 @@
2348 iSYp = iSY;
2349 iEXp = iEX;
2350 iEYp = iEY;
2351 }
2352 }
2353 if( iSXb==iEXb && (sqlite3_int64)(iE1-iS1)*(iE2-iS2)<400 ){
2354 /* If no common sequence is found using the hashing heuristic and
2355 ** the input is not too big, use the expensive exact solution */
2356 optimalLCS(p, iS1, iE1, iS2, iE2, piSX, piEX, piSY, piEY);
2357 }else{
2358 *piSX = iSXb;
2359
--- src/diff.c
+++ src/diff.c
@@ -2348,11 +2348,11 @@
2348 iSYp = iSY;
2349 iEXp = iEX;
2350 iEYp = iEY;
2351 }
2352 }
2353 if( iSXb==iEXb && (sqlite3_int64)(iE1-iS1)*(iE2-iS2)<1600 ){
2354 /* If no common sequence is found using the hashing heuristic and
2355 ** the input is not too big, use the expensive exact solution */
2356 optimalLCS(p, iS1, iE1, iS2, iE2, piSX, piEX, piSY, piEY);
2357 }else{
2358 *piSX = iSXb;
2359

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button