git-diff
git-diff copied to clipboard
Fake GitDiff Algorithm is super slow and can't disable the fallback to it.
When comparing two very long strings, there is an automatic fallback to the fake gitDiff algorithm. My server stops responding to requests for ~60+ seconds. Please (if you can) add the ability to disable the automatic fallback. I mean, don't compute any diff and skip it in can the real gitDiff fails for some reason.
I meant: [1] Add the ability to set by flag if I want this automatic fallback to happen or not. [2] Add the ability to limit the execution time of gitDiff operation. I mean, configure that after X milliseconds - reject.
Thank you!
I don't have time to implement this but if you raise a PR and the unit tests continue to pass and coverage remains at 100% then I will merge it.
One question, are the necessary CLI commands available? The documentation states what CLI commands are required - I think the key one is "printf" off the top of my head - if the required CLI commands are available then the fallback should never happen