sergi / go-diff

Diff, match and patch text in Go
MIT License
1.81k stars 207 forks source link

What is the checklines parameter? #95

Open dmjones opened 5 years ago

dmjones commented 5 years ago

The docs for DiffMain and DiffMainRunes don't explain what the checklines parameter is used for.

Digging through the source, it looks like this has an impact on how the diff is calculated, if the input is large enough. But I'm unclear the pros and cons for choosing this.

Happy to make a PR to update the documentation if someone can advise on the use?

sergi commented 5 years ago

From Java docs:

@param checklines Speedup flag. If false, then don't run a line-level diff first to identify the changed areas. If true, then run a faster slightly less optimal diff.

It would be great if you update the documentation with its definition!