Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mercurial "outgoing" check is slow #217

Closed
patramsey opened this issue Aug 15, 2013 · 6 comments
Closed

Mercurial "outgoing" check is slow #217

patramsey opened this issue Aug 15, 2013 · 6 comments
Labels
Mercurial Related to Mercurial (hg) VCS data slow An issue related to slow prompt generation

Comments

@patramsey
Copy link

This seems like a similar question to #19 but for Mercurial.

Setting "LP_ENABLE_HG=0" fixes the problem. The repo that this is happening on is approximately 700MB. Curious if anyone had any performance tips around this issue.

@dolmen
Copy link
Collaborator

dolmen commented Nov 25, 2013

You could also use the LP_DISABLED_VCS_PATH feature.

@komuta
Copy link

komuta commented Jan 23, 2014

I encounter some slowness with Mercurial repositories too. I think it is due to hg outgoingbeing systematically called, to check if there are local commits not yet pushed to the default remote.

The fact is, git and Mercurial works quite differently on the remote handling aspect. The remote tracking system of git allow you to handle a kind of image of remote branches, but in local. But this means it is only based on the fetched informations from remotes.

On the other side, Mercurial won't know nor maintain any information from the remote, unless ``hg outgoing`is called, and if the default remote is indeed on a remote server (either accessed through http or ssh), there will be a perceptible lag. I tend to focus on the state of the current working directory, not the diff with the remote, so I suggest adding an option to disable remote checking on mercurial at least.

@dolmen
Copy link
Collaborator

dolmen commented Jan 23, 2014

If it is slow because it does contact the remote server, I think we should completely remove the "hg outgoing" feature, instead of just allow to disable it.

@anthonygelibert I've seen you had disabled "hg outgoing" in your repo. What do you think?

@anthonygelibert
Copy link
Contributor

I noticed your discussion on the subject and I didn’t answered because, in my opinion, my solution is just an hack.

My problem was the same than everyone, the outgoing call is “very” expensive especially when you have bad Internet connection.
So I’ve implemented a macro called “LP_ENABLE_HG_OUTGOING” who enable this call (disabled by default).

It’s only to transform the call to outgoing into :
local -i commits=0
[[ $LP_ENABLE_HG_OUTGOING != 0 ]] && commits=$(hg outgoing —no-merges ${branch} 2>/dev/null | grep -c '(^changeset:)')

So, like it’s very cheap I didn’t mentioned it.

@dolmen
Copy link
Collaborator

dolmen commented Jan 24, 2014

@anthonygelibert Do you sometimes feel the need of enabling your LP_ENABLE_HG_OUTGOING, or do instead leave it always to off in practice?

@anthonygelibert
Copy link
Contributor

I didn’t choose to disable it for nothing ;-). I never never enable it, honestly. I prefer to call it from command line when required.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Mercurial Related to Mercurial (hg) VCS data slow An issue related to slow prompt generation
Projects
None yet
Development

No branches or pull requests

4 participants