Re: Caching merged diffs



Kai Willadsen wrote:
Amusingly enough, I looked at exactly the same issue yesterday. I went
for a simpler approach though (patch attached), and just cached the
SequenceMatcher calls; I'm pretty sure that that's the only really
expensive part of the updating. My version is missing cache-clearing,
but that's fairly easy to add.
Hi,

I did a quick test (run meld filediff.py meldapp.py, add a single character) and measured the time taken by _update_highlighting():
meld 1.3 - 1160ms
my patch - 12 ms
Kai's patch - 52ms

No matter which patch is applied the performance gain is *huge*, however, Kai's code looks much better :)

Cheers,
Piotr




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]