From: Jeff D. <da...@da...> - 2000-06-29 16:58:35
|
Hi Arno, >great! impressive stuff :o) Thanks! >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. Great. I guess now I'll have to remember how to CVS. I want to test it a bit more and add a couple more features. (Option to make WikiDiffFormatter output reverse diffs; a WikiDiff->compose method.) >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. That's actually a bit worrysome. (I hadn't done any profiling yet. Is there a good way to profile PHP?) Those test files are a particularly simple case, as there is only one diff in the middle of the file. The first thing WikiDiffEngine does is ignore the common lines at the beginning and end of each file. This leaves only 9 lines in the first file and 2 in the second. On second thought: how did you get that time? Is it possible that it includes the download time for the test files (they get read from sourceforge.net.) Jeff |