From: Arno H. <aho...@in...> - 2000-06-29 16:29:16
|
Jeff, > I've done a bit more reading, and have looked closed at the GNU diffutils > sources. This afternoon I hacked together my own PHP diff engine. I think > it's working, though I'd like to test it a bit more. Here it is if you'd > like to check it out. great! impressive stuff :o) I added it to the phpwiki right away. I had to modify the WikiDiffFormatter class so that it works with templates. Check out the latest CVS. > Computation time is still quadratic in file size. I did not include > in the code the heuristics which GNU diff uses to get around this, though > it could be easily done. As long as the files involved are not more than > a few hundred lines in length, it's probably not an issue. The test file you supplied has about 220 lines. On my machine (128MB, AMD K6-2 450 Mhz) computation takes about 0.2 sec. I guess that's reasonable. Diff will be a seldom used feature. /Arno |