D7144: status: use unfiltered repo if we're getting status of working copy

marmoute (Pierre-Yves David) phabricator at mercurial-scm.org
Wed Oct 30 16:15:38 EDT 2019


marmoute added a comment.


  
  
  In D7144#105048 <https://phab.mercurial-scm.org/D7144#105048>, @martinvonz wrote:
  
  > In D7144#105039 <https://phab.mercurial-scm.org/D7144#105039>, @marmoute wrote:
  >
  >>   I have a couple of questions:
  >>
  >> […]
  >>
  >> - This could cause issue to extensions, can we abtract the unfiltering though a function so that extension can rewrap it ?
  >
  > To make sure I address it properly, what's the issue(s) you're thinking of?
  
  Imagine you are an extension writer adding extra information on status (eg: tell the user if his stack is behind and he needs to rebase). If you get an unfiltered repository, any operation you run (eg: a revset to check the graph, will go horribly wrong). So we need need at minimum an easy way to disable the unfiltering if an extension needs to do it.
  
  In D7144#105066 <https://phab.mercurial-scm.org/D7144#105066>, @martinvonz wrote:
  
  > In D7144#105065 <https://phab.mercurial-scm.org/D7144#105065>, @marmoute wrote:
  >
  >> Another question is " Why are we loading the changelog if we don't need it ?". If the code were not accessing the changelog, we could not pay the filtering code (and save other parsing cost).
  >
  > We load the changelog when we do `repo['.']`. I had added a hack (https://www.mercurial-scm.org/repo/hg/file/4565a0afc289/mercurial/localrepo.py#l1539) to try to avoid that, but it was no longer effective. I think using the unfiltered repo is a better solution anyway.
  
  If the performance gain are clear, using an unfiltered repository seems like a reasonable gain/risk move. However I would prefer this to remain temporary. Keeping the repository filtering aligned to the current semantic is important to avoid surprise and obscure bug in the future. We need an overall effort to reduce the filtering impact anyway (independantly from this series).
  
  In the case here, I wonder if we have and easy way to prevent the filtering computation kick in, as it is clearly unnecessary.
  
  - can you share a profile of what takes time with the filtering version
  - Do you know which part is triggering the filtering ?

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D7144/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D7144

To: martinvonz, #hg-reviewers
Cc: mharbison72, pulkit, marmoute, mercurial-devel


More information about the Mercurial-devel mailing list