Make "rename" command an alias for "mv"?

John A Meinel john at arbash-meinel.com
Thu Oct 27 03:01:47 BST 2005


Robert Widhopf-Fenk wrote:
> On Sunday, October 23, 2005 at 20:58:06, John A Meinel wrote:
> [...]
>> Well, I wrote a plugin called "bzr service" which spawns an instance
>> which communicates over a socket.
> 
> Below are some fixes to get it working on my x86 Debian.
> 
> You must be running on big endian!?

Actually, I was probably testing it on my Mac, so yes, I was on a big
endian. (I thought I tested it on my x86 box as well, though hmm).

> 
> The HTON_4(x) macro should use bitwise-or not bitwise-and
> to flip the byte order, but why bother with this if there
> are ?standard? functions ;-)

My bad. :) No special reason, other than on windows you have to have
"winsock32" or whatever linked in to get the right function.

> 
> So now bzr feels much faster.  BTW in your other email you
> said this avoids loading the python interpreter each time,
> but hg is much faster here, so mayby it is not loading the
> interpreter but loading bzrlib and plugins?

Its mostly the time it takes to load all of bzrlib. You are correct. And
probably the time to search the filesystem and load plugins.

> 
> It is nice to got rid of the noticeable startup delay ;-)
> 
> ~/<1>plugins/service > time hg help > /dev/null
> 0.098u 0.012s 0:00.10 100.0%    0+0k 0+0io 0pf+0w
> ~/<1>plugins/service > time bzr help > /dev/null
> 0.288u 0.037s 0:00.32 96.8%     0+0k 0+0io 0pf+0w
> ~/<1>plugins/service > time ./client help > /dev/null
> 0.000u 0.001s 0:00.00 0.0%      0+0k 0+0io 0pf+0w
> ~/<1>plugins/service > time bzr diff > /dev/null
> 0.296u 0.046s 0:00.34 97.0%     0+0k 0+0io 0pf+0w
> ~/<1>plugins/service > time ./client diff > /dev/null
> 0.000u 0.001s 0:00.04 0.0%      0+0k 0+0io 0pf+0w
> 

That's pretty close to what I was seeing. I was using "time bzr root",
since this makes sure to load the all-important branch.py, which loads a
lot of stuff along with it.

Although python startup is not trivial either:
$ time python -c ""

real    0m0.076s
user    0m0.052s
sys     0m0.024s
$ time :|cat

real    0m0.007s
user    0m0.000s
sys     0m0.012s

Just running python and having it not do anything is 10x more expensive
than having "cat" do the same thing.

And even more so:
$ time echo ''


real    0m0.000s
user    0m0.000s
sys     0m0.000s


Echo is even faster (probably some of the above time is because of the
pipe).


> 
> Robert.

I'm glad you like it. Thanks for the patch.
It really needs to be updated to work better in a multi-user situation.
(named socket with 0600 permissions)

Though I think the other idea was to create a "bzr shell" which loads
everything and then dumps you into an interactive shell. "fai shell"
used to do that for arch.
The really nice part was having extra context-sensitive auto-completion.

John
=:->


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 249 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20051026/69564024/attachment.pgp 


More information about the bazaar mailing list