[pmwiki-users] New recipe: Fox

Patrick R. Michaud pmichaud at pobox.com
Tue Dec 19 16:16:55 CST 2006


On Tue, Dec 19, 2006 at 09:00:48PM +0000, Hans wrote:
> Tuesday, December 19, 2006, 9:01:14 PM, Patrick wrote:
> 
> > Those look okay to me -- perhaps you could create a sample
> > page on the sandbox site that demonstrates the type of page
> > history you're concerned about?
> 
> http://www.pmichaud.com/sandbox/fox/pmwiki.php?n=Main.CommentBox
> 
> I just posted 12 comments.
> Have  a look at the history.

Ahhh, I see what happening.  Since each entry has a similar template
format, the phpdiff engine is treating the instances of

    (:div1 class=frame:)
    >>div2 rfloat<<
    ...
    >>div2end<<
    ...
    (:div1end:)
    >>frame<<
    ...
    >>frame<<
    >><<

as being "identical" from one entry to the next, and thus each of
the dotted sections in between are treated as little changes.  
In other words, instead of thinking "I can just insert this small
chunk of text here", it sees the diff as a lot of small changes
to be done in between the parts of the page that remain the
same.

The phpdiff algorithm isn't quite smart enough to realize that 
chunking things into longer pieces could result in a shorter diff 
-- it just looks to see "do I have a sequence matching lines at 
this point in the output"?

I'm not sure what it would take to get phpdiff to look for longer
sequences of matching lines...but I suspect it could slow down
the algorithm considerably (and might require more memory).
If someone wants to take a look at improving the algorithm,
that might be worthwhile.

Pm




More information about the pmwiki-users mailing list