bug? find_branches or find_bzrdir tries to open all files as bzr locations
Alexander Belchenko
bialix at ukr.net
Mon May 16 08:48:11 UTC 2011
Aaron, I think your answers imply that you have talked only about remote
branches/remote servers/smart servers.
While I'm mostly concerned about local usage.
`bzr qlog` without any parameters run inside shared repository is trying
to detect all available branches and show log for all of them. And often
it has very slow start with many branches with many files.
So, I think it could perform better for local filesystem if it will skip
plain files. Perhaps symlinks should be inspected as well as
directories, I don't know.
Aaron Bentley пишет:
> On 11-05-06 04:05 PM, Alexander Belchenko wrote:
>> I think this is genuine bug in bzrdir search algorithm or maybe in
>> find_branches code, but: the latter tries to open every directory and
>> *every* plain file as bzrdir object. I suppose the original intent was
>> open_bzrdir always search directories upwards, but find_branches have
>> to search downwards but it never take care about skipping plain files.
>
> Checking whether a path is a directory is not possible on all transports
> (e.g. http), and it's also an extra round-trip. So I thought it made
> sense to just assume it was a directory, and handle the error if it
> turned out not to be one. Easier to ask forgiveness than permission.
>
>> Is it really bug as I think
>
> Well, it's intentional.
>
>> or bzrdir name does not implies it should
>> be dir only and should support files too?
>
> No, that wasn't intended.
>
>> Do you think it should skip
>> files and check directories only?
>
> I think that would be a sensible optimization for the smart server
> implementation.
>
>> Dp ypu think current behavior have
>> some performance penalties because it doing too much useless work?
>
> In the bzr case, it should have performance benefits because it avoids
> an unnecessary round-trip in the case that the path is a directory.
> Foreign branch support may complicate this picture.
>
> Aaron
More information about the bazaar
mailing list