Details
- Reviewers
- None
- Group Reviewers
hg-reviewers - Commits
- rHGa9d07bd8f758: mdiff: explicitly compute places for the newline marker
Diff Detail
- Repository
- rHG Mercurial
- Lint
Lint Skipped - Unit
Unit Tests Skipped
Event Timeline
I don't completely trust my numbers here, but it seems to give at least 3-4% for diffing netbsd-7 and netbsd-8.
3-4% is in line with what I'm seeing with ./hg perfunidiff mercurial/manifest.py 0 --count 500 --profile, and this looks like a better fix than what I've got. I'm a little weirded out by the change in interface where _unidiff yields a bool and then a sequence of hunks - was that needed for the change to work? I'm having trouble telling.
No, the change to yield a bool first is not strictly necessary for the rest of the logic. But it cheaply kills the need for the rewindhunk generator, i.e. it cuts a layer of indirection cheaply.
I'd slightly prefer this as two patches: one that does away with the rewindhunks goo (yay!), and then one that does the book-keeping to intelligently emit the "no newline" business. Can you tackle that?