Submitter | Boris Feld |
---|---|
Date | Nov. 23, 2018, 2:09 p.m. |
Message ID | <9f543638d909768a0db0.1542982142@localhost.localdomain> |
Download | mbox | patch |
Permalink | /patch/36735/ |
State | Accepted |
Headers | show |
Comments
On Fri, Nov 23, 2018 at 5:19 PM Boris Feld <boris.feld@octobus.net> wrote: > # HG changeset patch > # User Boris Feld <boris.feld@octobus.net> > # Date 1542935471 -3600 > # Fri Nov 23 02:11:11 2018 +0100 > # Node ID 9f543638d909768a0db0aa779d37817c4b8878ab > # Parent e72da9d014ba91ee4f2fe620a9646404a64d7484 > # EXP-Topic perf-branchmap > # Available At https://bitbucket.org/octobus/mercurial-devel/ > # hg pull https://bitbucket.org/octobus/mercurial-devel/ -r > 9f543638d909 > perf: prewarm the branchmap in perfbranchmapload > > It is not very interesting to have the command randomly failing because the > branchmap for the tested filter happens to be cold. So we make sure to > have a > valid up to date branchmap before going further. > > The data might still be missing from disk if a subset was equivalent. See > next > changeset for details and fix. > > diff --git a/contrib/perf.py b/contrib/perf.py > --- a/contrib/perf.py > +++ b/contrib/perf.py > @@ -2203,6 +2203,9 @@ def perfbranchmapload(ui, repo, filter=b > repo = repoview.repoview(repo, filter) > else: > repo = repo.unfiltered() > + > + repo.branchmap # make sure we have a relevant, up to date branchmap > Do you want to call this function? According to my understanding it won't load the branchmap or do something useful.
On 23/11/2018 15:49, Pulkit Goyal wrote: > > > On Fri, Nov 23, 2018 at 5:19 PM Boris Feld <boris.feld@octobus.net > <mailto:boris.feld@octobus.net>> wrote: > > # HG changeset patch > # User Boris Feld <boris.feld@octobus.net > <mailto:boris.feld@octobus.net>> > # Date 1542935471 -3600 > # Fri Nov 23 02:11:11 2018 +0100 > # Node ID 9f543638d909768a0db0aa779d37817c4b8878ab > # Parent e72da9d014ba91ee4f2fe620a9646404a64d7484 > # EXP-Topic perf-branchmap > # Available At https://bitbucket.org/octobus/mercurial-devel/ > # hg pull > https://bitbucket.org/octobus/mercurial-devel/ -r 9f543638d909 > perf: prewarm the branchmap in perfbranchmapload > > It is not very interesting to have the command randomly failing > because the > branchmap for the tested filter happens to be cold. So we make > sure to have a > valid up to date branchmap before going further. > > The data might still be missing from disk if a subset was > equivalent. See next > changeset for details and fix. > > diff --git a/contrib/perf.py b/contrib/perf.py > --- a/contrib/perf.py > +++ b/contrib/perf.py > @@ -2203,6 +2203,9 @@ def perfbranchmapload(ui, repo, filter=b > repo = repoview.repoview(repo, filter) > else: > repo = repo.unfiltered() > + > + repo.branchmap # make sure we have a relevant, up to date > branchmap > > > Do you want to call this function? According to my understanding it > won't load the branchmap or do something useful. Ho yeah, good catch. > > _______________________________________________ > Mercurial-devel mailing list > Mercurial-devel@mercurial-scm.org > https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
On Fri, Nov 23, 2018 at 8:21 PM Boris FELD <boris.feld@octobus.net> wrote: > On 23/11/2018 15:49, Pulkit Goyal wrote: > > > > On Fri, Nov 23, 2018 at 5:19 PM Boris Feld <boris.feld@octobus.net> wrote: > >> # HG changeset patch >> # User Boris Feld <boris.feld@octobus.net> >> # Date 1542935471 -3600 >> # Fri Nov 23 02:11:11 2018 +0100 >> # Node ID 9f543638d909768a0db0aa779d37817c4b8878ab >> # Parent e72da9d014ba91ee4f2fe620a9646404a64d7484 >> # EXP-Topic perf-branchmap >> # Available At https://bitbucket.org/octobus/mercurial-devel/ >> # hg pull https://bitbucket.org/octobus/mercurial-devel/ -r >> 9f543638d909 >> perf: prewarm the branchmap in perfbranchmapload >> >> It is not very interesting to have the command randomly failing because >> the >> branchmap for the tested filter happens to be cold. So we make sure to >> have a >> valid up to date branchmap before going further. >> >> The data might still be missing from disk if a subset was equivalent. See >> next >> changeset for details and fix. >> >> diff --git a/contrib/perf.py b/contrib/perf.py >> --- a/contrib/perf.py >> +++ b/contrib/perf.py >> @@ -2203,6 +2203,9 @@ def perfbranchmapload(ui, repo, filter=b >> repo = repoview.repoview(repo, filter) >> else: >> repo = repo.unfiltered() >> + >> + repo.branchmap # make sure we have a relevant, up to date branchmap >> > > Do you want to call this function? According to my understanding it won't > load the branchmap or do something useful. > > Ho yeah, good catch. > Okay, appended '()' in flight and queued 6-8, many thanks! > > _______________________________________________ > Mercurial-devel mailing listMercurial-devel@mercurial-scm.orghttps://www.mercurial-scm.org/mailman/listinfo/mercurial-devel > >
Patch
diff --git a/contrib/perf.py b/contrib/perf.py --- a/contrib/perf.py +++ b/contrib/perf.py @@ -2203,6 +2203,9 @@ def perfbranchmapload(ui, repo, filter=b repo = repoview.repoview(repo, filter) else: repo = repo.unfiltered() + + repo.branchmap # make sure we have a relevant, up to date branchmap + # try once without timer, the filter may not be cached if branchmap.read(repo) is None: raise error.Abort(b'No branchmap cached for %s repo'