Re: [PATCH] auto merge action



On 10 May 2010 16:52, Piotr Piastucki <leech miranda gmail com> wrote:
> Hi,
>
> Thanks a lot for all the comments! I will try to improve the patch based on
> your input.
> However, I am going to keep merge_2_files() as it is because:
> 1) I pass the original linediffer to Merger so the changes applied should be
> exactly the same as the changes shown to the user
> 2) it is about 10 times faster than calling replace_chunk in a loop on my
> machine
> I am attaching a patch that can be used to compare performance of both
> approaches and two test files:
> - run meld meldapp_1.py meldapp_1.py meldapp_2.py
> - right click middle pane, select Pull all non-conflicting from right (see
> console)
> - right click middle pane again, select Pull all non-conflicting from left
> (see console)

I tried this, but I don't get any console output, and the patch has no
reference to replace_chunk.

Since I couldn't check your approach, I'm just guessing here, but... I
suspect that the only reason that there is any difference in speed is
that you forgot to suspend the appropriate signal emission before
starting the replace_chunk loop. If that's the case, then we're doing
a whole update-diff, update-highlighting, etc. cycle for each chunk,
and that *would* be slow.

cheers,
Kai


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