Sophie

Sophie

distrib > Mageia > 5 > i586 > by-pkgid > 27647990744ebd9cfe32398f37f67e20 > files > 2652

bzr-2.6.0-11.1.mga5.i586.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>“bzr update” performance analysis &mdash; Bazaar 2.6.0 documentation</title>
    
    <link rel="stylesheet" href="_static/default.css" type="text/css" />
    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
    
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    './',
        VERSION:     '2.6.0',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="_static/jquery.js"></script>
    <script type="text/javascript" src="_static/underscore.js"></script>
    <script type="text/javascript" src="_static/doctools.js"></script>
    <link rel="shortcut icon" href="_static/bzr.ico"/>

    <link rel="top" title="Bazaar 2.6.0 documentation" href="index.html" />
    <link rel="up" title="Miscellaneous notes" href="miscellaneous-notes.html" />
    <link rel="prev" title="Dirstate" href="dirstate.html" />
<link rel="stylesheet" href="_static/bzr-doc.css" type="text/css" />
 
  </head>
  <body>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="dirstate.html" title="Dirstate"
             accesskey="P">previous</a></li>
<li><a href="http://bazaar.canonical.com/">
    <img src="_static/bzr icon 16.png" /> Home</a>&nbsp;|&nbsp;</li>
<a href="http://doc.bazaar.canonical.com/en/">Documentation</a>&nbsp;|&nbsp;</li>

        <li><a href="index.html">Developer Document Catalog (2.6.0)</a> &raquo;</li>

          <li><a href="miscellaneous-notes.html" accesskey="U">Miscellaneous notes</a> &raquo;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <div class="section" id="bzr-update-performance-analysis">
<h1>&#8220;bzr update&#8221; performance analysis<a class="headerlink" href="#bzr-update-performance-analysis" title="Permalink to this headline">¶</a></h1>
<p>There are 5 different slightly different situations in which bzr update
can be used:</p>
<ul class="simple">
<li>local only (no-op)</li>
<li>lightweight checkout</li>
<li>heavy checkout</li>
<li>heavy checkout w/ local changes</li>
<li>bzr update could work on &#8220;bound branch&#8221; w/no wt</li>
</ul>
</div>
<div class="section" id="no-new-revisions">
<h1>No new revisions<a class="headerlink" href="#no-new-revisions" title="Permalink to this headline">¶</a></h1>
<p>Should be O(1) to determine
Tree base is up to date
wt.last-rev == wt.b.last-rev</p>
</div>
<div class="section" id="no-local-changes-only-new-revisions">
<h1>No local changes, only new revisions<a class="headerlink" href="#no-local-changes-only-new-revisions" title="Permalink to this headline">¶</a></h1>
<ol class="arabic simple">
<li>Need to move wt.last_rev (O(1))</li>
<li>apply delta from base to new rev (O(changes))
applying changes to files is approx (O(lines-in-files ^ 2))</li>
<li>update meta-info (executable bits, etc) about modified files (O(changes))</li>
</ol>
<p>2/3 could be concurrent (but that may not necessarily be faster)</p>
<p>potential issue w/ serialized is having 50k files in limbo/</p>
<p>the limbo/ directory could be avoided in some cases, for example when
adding new files in new directories.</p>
<p>modifying in place: reduces fragmentation of fs, not atomic
w/ local modification, potential of data loss
w/o should be safe</p>
<p>&#8220;local mod&#8221; is diff between disk and last commit, not merge base</p>
<p>Detecting name conflicts should be O(siblings). Alternatively, conflicts
with existing files can be detected using stat() and conflicts with new files
can be detected by examining the pending transform. This changes
complexity to O(changes).</p>
</div>
<div class="section" id="out-of-date-heavyweight-checkout-out-of-date-w-master">
<h1>out of date heavyweight checkout, out of date w/master<a class="headerlink" href="#out-of-date-heavyweight-checkout-out-of-date-w-master" title="Permalink to this headline">¶</a></h1>
<ol class="arabic simple">
<li>open working tree, check latest revision</li>
<li>open working tree branch, check latest revision</li>
<li>mismatch =&gt; update wt =&gt; wt.b.lastrev
apply delta to tree O(changed file size)
&#8212;- conflicts
stop on conflicts
stop always -&gt; inform user they need to repeat (why not?, GFD)</li>
<li>pull new revs M =&gt; L O(newrevs)</li>
<li>apply delta to wt
local committed changes become a pending merge
local uncommitted stay uncommitted
local pending merges are retained (should be gc&#8217;d)</li>
</ol>
<p>offtopic:
should bzr update report where the source is ?
should bzr update handle both cases (local tree out-of-date w/local branch, checkout out-of-date w/master) ?</p>
<p>if updating would diverge, give opportuniuty to branch/unbind instead
local ahead, &#8220;push to master&#8221;</p>
<p>ideas:
1) can this be done as a single logical step?
2) can this be done w/o modifying working tree until end? possible performance improvements
3) if the pulling revision step could deliver full texts, that may help for the merge (same thing as &#8220;bzr pull&#8221;)</p>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
  <h3><a href="index.html">Table Of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">&#8220;bzr update&#8221; performance analysis</a></li>
<li><a class="reference internal" href="#no-new-revisions">No new revisions</a></li>
<li><a class="reference internal" href="#no-local-changes-only-new-revisions">No local changes, only new revisions</a></li>
<li><a class="reference internal" href="#out-of-date-heavyweight-checkout-out-of-date-w-master">out of date heavyweight checkout, out of date w/master</a></li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="dirstate.html"
                        title="previous chapter">Dirstate</a></p>
  <h3>This Page</h3>
  <ul class="this-page-menu">
    <li><a href="_sources/update.txt"
           rel="nofollow">Show Source</a></li>
  </ul>
<div id="searchbox" style="display: none">
  <h3>Quick search</h3>
    <form class="search" action="search.html" method="get">
      <input type="text" name="q" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    <p class="searchtip" style="font-size: 90%">
    Enter search terms or a module, class or function name.
    </p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="dirstate.html" title="Dirstate"
             >previous</a></li>
<li><a href="http://bazaar.canonical.com/">
    <img src="_static/bzr icon 16.png" /> Home</a>&nbsp;|&nbsp;</li>
<a href="http://doc.bazaar.canonical.com/en/">Documentation</a>&nbsp;|&nbsp;</li>

        <li><a href="index.html">Developer Document Catalog (2.6.0)</a> &raquo;</li>

          <li><a href="miscellaneous-notes.html" >Miscellaneous notes</a> &raquo;</li> 
      </ul>
    </div>
    <div class="footer">
        &copy; Copyright 2009-2011 Canonical Ltd.
      Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
    </div>
  </body>
</html>