bzr-explorer performance question
Maritza Mendez
martitzam at gmail.com
Mon Jun 28 00:05:57 BST 2010
On Sun, Jun 27, 2010 at 12:52 PM, John Arbash Meinel <john at arbash-meinel.com
> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
>
> ...
>
> > Step 4A: refresh working pane in bzr-explorer
> > -- a few seconds (less than 10sec) for Ubuntu
> > -- 4.5 minutes for Windows (!)
> >
>
> ...
>
> > Since the test conditions are anecdotal (but the results are
> > reproducible!) the only result I am really concerned about is in step
> > 4. It appears that refreshing the "status window" takes a very long
> > time on Windows, during which one core of the CPU is saturated. But
> > doing a 'bzr stat' on the very same trunk on Windows is fast. Could
> > there be something strange about how bzr-explorer builds the status?
> > What exactly could 'refresh' be doing which could take 4.5 minutes?
> >
> > Thanks.
> > ~M
> >
>
> One thing to check. Do:
>
> bzr co --lightweight $SOURCE new-workingtree
> cd new-workingtree
> time bzr status
>
> And see what the timing is. The specific thing we are looking for is the
> time of the *first* status.
>
> It is *possible* that we aren't getting the timestamp => sha1 cache
> getting written correctly during the checkout. Which is causing us to
> recompute the sha1 sum of your entire tree.
>
> IIRC, the potential issue is because:
>
> f = open('foo', 'rb')
> st1 = os.fstat(f)
> st2 = os.lstat('foo')
>
> On everything but Windows, those give identical results. However on
> Windows, they might differ. And IIRC the way that they differ is
> different for different versions of python. (2.5 used st_dev, 2.6 uses
> st_ino, or something along those lines.)
>
> Anyway, if you are experiencing this:
>
> a) We can fix it by just ignoring those fields, but we need to know what
> to ignore.
>
> b) It should only effect the first status/refresh that you do. All
> others should still be in the 'couple of seconds' range.
>
> John
> =:->
>
John,
Since the 'time' command on Windows turns out to be pretty useless, I will
either write my own 'time' or load up Cygwin. But even before I go that
far, I see a problem.
I'm working with the same project from my original email. The shared repo
is in a folder called 'Medium' on my Desktop and has a single branch called
'trunk.' I am logged in as root, living on the edge:
C:\Documents and Settings\root\Desktop\Medium\trunk
The following types in a DOS box
*cd C:\Documents and Settings\root\Desktop*
*mkdir work*
*cd work*
*bzr co --lightweight ..\Medium\trunk mycheckout*
appears to work but concludes with
*bzr: ERROR: [Error 5] Access is denied*
and here is what I find in my .bzr log:
Sun 2010-06-27 15:41:49 -0700
0.062 bazaar version: 2.1.1
0.062 bzr arguments: [u'co', u'--lightweight', u'..\\Medium\\trunk',
u'myckout']
0.078 looking for plugins in C:/Documents and Settings/root/Application
Data/bazaar/2.0/plugins
0.078 looking for plugins in C:/Program Files/Bazaar/plugins
0.156 encoding stdout as sys.stdout encoding 'cp437'
0.187 opening working tree 'C:/Documents and
Settings/root/Desktop/Medium/trunk'
0.250 creating branch reference in
file:///C:/Documents%20and%20Settings/root/Desktop/work/myckout/.bzr/
0.281 opening working tree 'C:/Documents and
Settings/root/Desktop/work/myckout'
84.922 Traceback (most recent call last):
File "bzrlib\commands.pyo", line 853, in exception_to_return_code
File "bzrlib\commands.pyo", line 1055, in run_bzr
File "bzrlib\commands.pyo", line 661, in run_argv_aliases
File "bzrlib\commands.pyo", line 665, in run_direct
File "bzrlib\cleanup.pyo", line 122, in run_simple
File "bzrlib\cleanup.pyo", line 156, in _do_with_cleanups
File "bzrlib\builtins.pyo", line 1328, in run
File "bzrlib\branch.pyo", line 1334, in create_checkout
File "bzrlib\bzrdir.pyo", line 1616, in create_workingtree
File "bzrlib\workingtree_4.pyo", line 1462, in initialize
File "bzrlib\transform.pyo", line 2253, in build_tree
File "bzrlib\transform.pyo", line 2363, in _build_tree
File "bzrlib\transform.pyo", line 1539, in apply
File "bzrlib\transform.pyo", line 1667, in _apply_insertions
File "bzrlib\transform.pyo", line 2902, in rename
WindowsError: [Error 5] Access is denied
84.922 Transferred: 0KiB (0.0K/s r:0K w:0K)
84.922 return code 3
If I run 'bzr check' on mycheckout, it finds no problems with either working
tree, the parent branch or the repo. In other words, 'bzr check' thinks
everythign is ok. But! There are no files in 'mycheckout' except for the
.bzr folder!
Could this be related to our quest? Or is this a separate issue to report?
By the way,
cd mycheckout
bzr stat
comes back essentially instantaneously, bound only by the time it takes to
write to the console. But then if I start bzr-explorer and open location
mycheckout, bzr-explorer enters a 'not responding' state for over three
minutes before finally displaying the status of the checkout. (During those
3+ minutes, the core running bzr is saturated.) Not surprisingly, (see
above) all of the files are shown as removed. Subsequently hitting 'refresh
in bzr-explorer puts us into another 3+ minutes of CPU saturation.
Meanwhile, 'bzr stat' on the commandline works in a flash -- even while
bzr-explorer is unresponsive.
~M
~M
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.ubuntu.com/archives/bazaar/attachments/20100627/d8c7f9c3/attachment-0001.htm
More information about the bazaar
mailing list