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

Regarding the VCS module #287

Closed
johnroach opened this Issue Jul 5, 2016 · 28 comments

Comments

Projects
None yet
3 participants
@johnroach

johnroach commented Jul 5, 2016

Hi, I have been using the your theme with the VCS module without any issues until the recent update I got. Now it is extremely slow. Each time I ls a repository directory I have to wait at least 10-20 seconds. Has there been any reason why there could be a performance degradation?

Thank you!

@johnroach

This comment has been minimized.

Show comment
Hide comment
@johnroach

johnroach Jul 5, 2016

My settings can be found below:

ZSH_THEME="powerlevel9k/powerlevel9k"
POWERLEVEL9K_MODE='awesome-patched'
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(context dir vcs)
POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(status history time)
POWERLEVEL9K_TIME_FORMAT='%D{%H:%M}'
POWERLEVEL9K_STATUS_VERBOSE=false
POWERLEVEL9K_SHORTEN_STRATEGY="truncate_middle"
POWERLEVEL9K_SHORTEN_DIR_LENGTH=4
POWERLEVEL9K_VCS_SHOW_SUBMODULE_DIRTY=false

johnroach commented Jul 5, 2016

My settings can be found below:

ZSH_THEME="powerlevel9k/powerlevel9k"
POWERLEVEL9K_MODE='awesome-patched'
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(context dir vcs)
POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(status history time)
POWERLEVEL9K_TIME_FORMAT='%D{%H:%M}'
POWERLEVEL9K_STATUS_VERBOSE=false
POWERLEVEL9K_SHORTEN_STRATEGY="truncate_middle"
POWERLEVEL9K_SHORTEN_DIR_LENGTH=4
POWERLEVEL9K_VCS_SHOW_SUBMODULE_DIRTY=false
@bhilburn

This comment has been minimized.

Show comment
Hide comment
@bhilburn

bhilburn Jul 6, 2016

Owner

@johnroach - Whoa, that's not good!

Are you using a release, or are you working off of next? Can you give us the hash of the checkout you are using, now, where it's slow? Also, do you remember which checkout you were using when it was good?

Owner

bhilburn commented Jul 6, 2016

@johnroach - Whoa, that's not good!

Are you using a release, or are you working off of next? Can you give us the hash of the checkout you are using, now, where it's slow? Also, do you remember which checkout you were using when it was good?

@johnroach

This comment has been minimized.

Show comment
Hide comment
@johnroach

johnroach Jul 6, 2016

I tried both next and master both are very very slow.
I will be slowly reverting. To see what broke vcs.

johnroach commented Jul 6, 2016

I tried both next and master both are very very slow.
I will be slowly reverting. To see what broke vcs.

@johnroach

This comment has been minimized.

Show comment
Hide comment
@johnroach

johnroach Jul 6, 2016

Did a vanilla installation of oh-my-zsh. No slowness... However the moment I start using the powerlevel9k everything slows down so much. I reverted all the way back to Feb still having issues. I hadn't updated the theme since I first installed it which was back in October '15.

johnroach commented Jul 6, 2016

Did a vanilla installation of oh-my-zsh. No slowness... However the moment I start using the powerlevel9k everything slows down so much. I reverted all the way back to Feb still having issues. I hadn't updated the theme since I first installed it which was back in October '15.

@bhilburn

This comment has been minimized.

Show comment
Hide comment
@bhilburn

bhilburn Jul 6, 2016

Owner

@johnroach - Quick question: do you experience this slowness in all git repositories, or only ones with submodules?

If you first installed it in October of 2015, you were probably using v0.2.0. Can you give v0.3.0 a shot and let me know if you see the problem?

Unfortunately, I can't replicate the issue, so I have to rely on you to do the testing. Sorry!

https://github.com/bhilburn/powerlevel9k/releases

Owner

bhilburn commented Jul 6, 2016

@johnroach - Quick question: do you experience this slowness in all git repositories, or only ones with submodules?

If you first installed it in October of 2015, you were probably using v0.2.0. Can you give v0.3.0 a shot and let me know if you see the problem?

Unfortunately, I can't replicate the issue, so I have to rely on you to do the testing. Sorry!

https://github.com/bhilburn/powerlevel9k/releases

@johnroach

This comment has been minimized.

Show comment
Hide comment
@johnroach

johnroach Jul 9, 2016

I experience this in all git repos. Will try out 0.3.0 Thank you for the suggestion.

johnroach commented Jul 9, 2016

I experience this in all git repos. Will try out 0.3.0 Thank you for the suggestion.

@johnroach

This comment has been minimized.

Show comment
Hide comment
@johnroach

johnroach Jul 9, 2016

I tried 0.3.0 I am sorry to say it didn't work. However I just tried the following and was able to get the previous good performance from the following checkout;

git checkout 62dee9824b6de724b4fa0d2b43c30fa194eb9280

johnroach commented Jul 9, 2016

I tried 0.3.0 I am sorry to say it didn't work. However I just tried the following and was able to get the previous good performance from the following checkout;

git checkout 62dee9824b6de724b4fa0d2b43c30fa194eb9280
@bhilburn

This comment has been minimized.

Show comment
Hide comment
@bhilburn

bhilburn Jul 17, 2016

Owner

@johnroach - Thanks for the bug hunting! So that commit is actually our v0.2.0 tag. Unfortunately, there was a significant amount of work between v0.3.0 (known bad) and v0.2.0 (known good).

I am completely unable to replicate the performance you describe (10-20 seconds) in repositories, so I actually can't do this bisect myself.

Are you familiar with using git bisect? It's a great tool for traversing the tree and determining which commit actually broke things. Would you mind running a git bisect with v0.2.0 as your known-good and v0.3.0 as your known bad?

(By the way, what version of git do you have installed?)

Owner

bhilburn commented Jul 17, 2016

@johnroach - Thanks for the bug hunting! So that commit is actually our v0.2.0 tag. Unfortunately, there was a significant amount of work between v0.3.0 (known bad) and v0.2.0 (known good).

I am completely unable to replicate the performance you describe (10-20 seconds) in repositories, so I actually can't do this bisect myself.

Are you familiar with using git bisect? It's a great tool for traversing the tree and determining which commit actually broke things. Would you mind running a git bisect with v0.2.0 as your known-good and v0.3.0 as your known bad?

(By the way, what version of git do you have installed?)

@johnroach

This comment has been minimized.

Show comment
Hide comment
@johnroach

johnroach Jul 17, 2016

The git version is git version 2.3.2 (Apple Git-55)

I will test out git bisect

johnroach commented Jul 17, 2016

The git version is git version 2.3.2 (Apple Git-55)

I will test out git bisect

@johnroach

This comment has been minimized.

Show comment
Hide comment
@johnroach

johnroach Jul 17, 2016

@bhilburn Ok it looks like I found it. Thank you for showing me git bisect! It is pretty awesome.
Any way this is where I was able to pinpoint the issue:

6bf2869a1c8e509d1d0bb05ea05e179c48b9f7c4 is the first bad commit
commit 6bf2869a1c8e509d1d0bb05ea05e179c48b9f7c4
Author: Dominik Ritter <dritter03@googlemail.com>
Date:   Sun Oct 11 19:41:52 2015 +0200
Cleanup of VCS-segment. Now `vcs_info` is only invoked, if the user configured to show the `vcs` segment.
:100755 100755 0c69a02e7f113f8104063afd43851195210000f4 8ffc638483b118ed92cadc4a00d144fd8f68c753 M  powerlevel9k.zsh-theme

Which makes some sense...

johnroach commented Jul 17, 2016

@bhilburn Ok it looks like I found it. Thank you for showing me git bisect! It is pretty awesome.
Any way this is where I was able to pinpoint the issue:

6bf2869a1c8e509d1d0bb05ea05e179c48b9f7c4 is the first bad commit
commit 6bf2869a1c8e509d1d0bb05ea05e179c48b9f7c4
Author: Dominik Ritter <dritter03@googlemail.com>
Date:   Sun Oct 11 19:41:52 2015 +0200
Cleanup of VCS-segment. Now `vcs_info` is only invoked, if the user configured to show the `vcs` segment.
:100755 100755 0c69a02e7f113f8104063afd43851195210000f4 8ffc638483b118ed92cadc4a00d144fd8f68c753 M  powerlevel9k.zsh-theme

Which makes some sense...

@bhilburn

This comment has been minimized.

Show comment
Hide comment
@bhilburn

bhilburn Jul 21, 2016

Owner

@johnroach - Great! So glad you found it. I'm going to try and dig into this this weekend...

Owner

bhilburn commented Jul 21, 2016

@johnroach - Great! So glad you found it. I'm going to try and dig into this this weekend...

@johnroach

This comment has been minimized.

Show comment
Hide comment
@johnroach

johnroach Jul 23, 2016

Can't wait. Thank you!

johnroach commented Jul 23, 2016

Can't wait. Thank you!

@johnroach

This comment has been minimized.

Show comment
Hide comment
@johnroach

johnroach Aug 8, 2016

@bhilburn were you able to check this?

johnroach commented Aug 8, 2016

@bhilburn were you able to check this?

@afterefx

This comment has been minimized.

Show comment
Hide comment
@afterefx

afterefx Aug 10, 2016

I am also facing this same issue.

afterefx commented Aug 10, 2016

I am also facing this same issue.

@johnroach

This comment has been minimized.

Show comment
Hide comment
@johnroach

johnroach Aug 11, 2016

can you test commit 6bf2869 and one before it to see if you see a difference too?

johnroach commented Aug 11, 2016

can you test commit 6bf2869 and one before it to see if you see a difference too?

@afterefx

This comment has been minimized.

Show comment
Hide comment
@afterefx

afterefx Aug 11, 2016

So with 6bf2869 it was still slow. I went to the commit before and everything is up to speed again. Looks like the culprit is 6bf2869

afterefx commented Aug 11, 2016

So with 6bf2869 it was still slow. I went to the commit before and everything is up to speed again. Looks like the culprit is 6bf2869

@bhilburn

This comment has been minimized.

Show comment
Hide comment
@bhilburn

bhilburn Aug 11, 2016

Owner

@johnroach, @carlic578 - Sorry for the delay on this. I finally got some time to sit down and hack on this, and I think I have something.

Try out the branch speed-up-vcs. https://github.com/bhilburn/powerlevel9k/tree/speed-up-vcs

On my machine, I'm seeing speedups on the order of 50% - 66% when using the vcs segment in git repositories. Let me know how it goes for you!

Owner

bhilburn commented Aug 11, 2016

@johnroach, @carlic578 - Sorry for the delay on this. I finally got some time to sit down and hack on this, and I think I have something.

Try out the branch speed-up-vcs. https://github.com/bhilburn/powerlevel9k/tree/speed-up-vcs

On my machine, I'm seeing speedups on the order of 50% - 66% when using the vcs segment in git repositories. Let me know how it goes for you!

@afterefx

This comment has been minimized.

Show comment
Hide comment
@afterefx

afterefx Aug 11, 2016

Nope, as soon as I went into a git repo, it slowed to a crawl with the speed-up-vcs branch.

afterefx commented Aug 11, 2016

Nope, as soon as I went into a git repo, it slowed to a crawl with the speed-up-vcs branch.

@bhilburn

This comment has been minimized.

Show comment
Hide comment
@bhilburn

bhilburn Aug 11, 2016

Owner

@carlic578 - And, just to be clear, it's slower than the commit before 6bf2869?

For me, I see an improvement from this:
shell 0.45s user 0.32s system 0% cpu 48:19:10.66 total

to this:
shell 0.07s user 0.07s system 3% cpu 3.612 total

Owner

bhilburn commented Aug 11, 2016

@carlic578 - And, just to be clear, it's slower than the commit before 6bf2869?

For me, I see an improvement from this:
shell 0.45s user 0.32s system 0% cpu 48:19:10.66 total

to this:
shell 0.07s user 0.07s system 3% cpu 3.612 total

@afterefx

This comment has been minimized.

Show comment
Hide comment
@afterefx

afterefx Aug 11, 2016

Correct, it's slower than the commit before 6bf2869 which for me turns out to be 3e7caf5

afterefx commented Aug 11, 2016

Correct, it's slower than the commit before 6bf2869 which for me turns out to be 3e7caf5

@bhilburn

This comment has been minimized.

Show comment
Hide comment
@bhilburn

bhilburn Aug 11, 2016

Owner

@carlic578 - Roger. Can you try one more branch where I've made some additional changes? See removing-zle-functions: https://github.com/bhilburn/powerlevel9k/tree/removing-zle-funcs

Thanks for helping me debug, by the way!

Owner

bhilburn commented Aug 11, 2016

@carlic578 - Roger. Can you try one more branch where I've made some additional changes? See removing-zle-functions: https://github.com/bhilburn/powerlevel9k/tree/removing-zle-funcs

Thanks for helping me debug, by the way!

@afterefx

This comment has been minimized.

Show comment
Hide comment
@afterefx

afterefx Aug 11, 2016

No speed loss this time. Just as quick as 3e7caf5.

afterefx commented Aug 11, 2016

No speed loss this time. Just as quick as 3e7caf5.

@bhilburn

This comment has been minimized.

Show comment
Hide comment
@bhilburn

bhilburn Aug 11, 2016

Owner

Whoa, really? Awesome!! So happy to hear that!

@johnroach - Can you give removing-zle-funcs a try, too?

Owner

bhilburn commented Aug 11, 2016

Whoa, really? Awesome!! So happy to hear that!

@johnroach - Can you give removing-zle-funcs a try, too?

@afterefx

This comment has been minimized.

Show comment
Hide comment
@afterefx

afterefx Aug 11, 2016

Looking a little closer, while it's faster, I noticed a difference in my prompts. The vi_mode on the right prompt doesn't work quite like it should, which could be related to a change at an earlier commit.

I also get double git octocat heads on the left prompt. This seems to have fixed itself while bisecting...odd

afterefx commented Aug 11, 2016

Looking a little closer, while it's faster, I noticed a difference in my prompts. The vi_mode on the right prompt doesn't work quite like it should, which could be related to a change at an earlier commit.

I also get double git octocat heads on the left prompt. This seems to have fixed itself while bisecting...odd

@johnroach

This comment has been minimized.

Show comment
Hide comment
@johnroach

johnroach Aug 13, 2016

@bhilburn just checked out removing-zle-funcs . Not really feeling any lag! Thank you for the fix!

johnroach commented Aug 13, 2016

@bhilburn just checked out removing-zle-funcs . Not really feeling any lag! Thank you for the fix!

@bhilburn

This comment has been minimized.

Show comment
Hide comment
@bhilburn

bhilburn Aug 31, 2016

Owner

@johnroach, @carlic578 - I'm so glad this resolved the issue! I have merged this fix into the next branch. Can you checkout the latest next, give it a go, and confirm you still see the improvement?

Owner

bhilburn commented Aug 31, 2016

@johnroach, @carlic578 - I'm so glad this resolved the issue! I have merged this fix into the next branch. Can you checkout the latest next, give it a go, and confirm you still see the improvement?

@bhilburn

This comment has been minimized.

Show comment
Hide comment
@bhilburn

bhilburn Aug 31, 2016

Owner

(If you see the issue crop back up, please re-open this bug!)

Owner

bhilburn commented Aug 31, 2016

(If you see the issue crop back up, please re-open this bug!)

@bhilburn bhilburn closed this Aug 31, 2016

@johnroach

This comment has been minimized.

Show comment
Hide comment
@johnroach

johnroach Sep 1, 2016

On next all looks good!

johnroach commented Sep 1, 2016

On next all looks good!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment