[PERFORMANCE] url encoding
John Arbash Meinel
john at arbash-meinel.com
Fri Jun 9 20:40:41 BST 2006
Robert Collins wrote:
> I have a thought about a good compromise for performance in our
> transport layer.
>
> Each Transport is a handle to a directory... and URLs from users are
> broken into two parts:
>
> - the directory we connect to
> - the file the user specified
>
> After that split, all the file operations we perform, including
> subdirs-from-the-user-dir, are generated by bzr, and are strictly ascii.
>
> It seems reasonable to me that we could encode this in the api of
> Transport - that is, 'transport.put(foo)' would expect an ascii only,
> non unicode, non escaped, relative reference in foo, with no '..'. This
> would allow LocalTransport to fast-path all local operations with no
> escaping, without running into a mess with predicting encoding on remote
> servers.
>
> Aaron and I chatted about this and thought it was reasonable. What does
> the larger community think?
>
> Rob
Well, do we want to declare that everything under .bzr/ is always going
to be 7-bit ascii with no illegal filesystem characters?
It seems reasonable to do, since that helps integrity. It would mean
escaping needs to still happen at higher levels, though. And probably
unescaping would also need to happen (at the higher level). But you are
right, it would mean that LocalTransport wouldn't need to escape the
results from 'listdir'.
Except for the fact that Transport.mkdir() can be called on user
supplied paths, for stuff like 'bzr branch' and 'bzr push', and I think
we want to allow for having unicode paths outside of .bzr.
John
=:->
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 254 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060609/11f2372b/attachment.pgp
More information about the bazaar
mailing list