Re: [PATCH/RFC] Fix scanning of entire VC repository for single-file diff



On 26 April 2010 03:50, Peter Tyser <ptyser gmail com> wrote:
> Previously, running meld on one file in a version-controlled directory
> would result in meld scanning the entire repository for modifications.
> The scanning of the entire repository was unnecessary and could hog
> system resources, especially on larger repositories.
>
> Signed-off-by: Peter Tyser <ptyser gmail com>
> ---
> I don't know if the logic added to _set_location() is the best way to
> prevent repository-wide searching, so comments are more than welcome.

This looks reasonable to me, and fixes the problem. Ideally the VC
module would expose a way to get arbitrary diffs between revisions
without creating a VcView; this would also give us more VC-related
capabilities. However, the patch looks good for now, so I've pushed
it.

Of course, at least part of the reason we're slow here at all is that
in the common case (show modified on, show normal/non-vc/ignored off)
we *still* scan the whole directory, even though we could easily make
do with just VC-provided modified information.

thanks,
Kai


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