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

Fast git #937

Merged
merged 16 commits into from
Sep 8, 2020
Merged

Fast git #937

merged 16 commits into from
Sep 8, 2020

Conversation

mattn
Copy link
Contributor

@mattn mattn commented Feb 20, 2020

When using many plugins, vim-plug spawn many git processes for them.

  • get revision
  • get branch
  • get remote.origin.url

This is too heavy. especially on Windows. This change get revision, branch,
remote origin url directly from .git directory.

This idea is borrowed from @k-takata's commit for minpac devel branch.

Before
screenshot
After
screenshot

When using many plugins, vim-plug may spawn many git processes for them.

* get revision
* get branch
* get remote.origin.url

This is too heavy. especially on Windows. This change get revision, branch,
remote origin url directly from .git directory.

This idea is borrowed from @k-takata's commit for minpac.

Executing external programs is slow especially on Windows.
Read the information directly from .git directory.
Copy link

@k-takata k-takata left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think #690 will be solved by this PR.

plug.vim Outdated Show resolved Hide resolved
Repository owner deleted a comment Mar 14, 2020
@Shougo
Copy link

Shougo commented Aug 23, 2020

@mattn CI seems failed. Can you fix it?

@mattn
Copy link
Contributor Author

mattn commented Aug 24, 2020

As far as I can see the output of travis CI, it seems a problem of tester.

@Shougo
Copy link

Shougo commented Aug 24, 2020

Oh, OK.

@junegunn
Copy link
Owner

As far as I can see the output of travis CI, it seems a problem of tester.

There are failing test cases. Look for (X) in https://travis-ci.org/github/junegunn/vim-plug/jobs/720180357

@mattn
Copy link
Contributor Author

mattn commented Aug 30, 2020

@junegunn One of tests passed successfully. But others are timed-out. (over 10min)

@mattn
Copy link
Contributor Author

mattn commented Aug 30, 2020

Anyway, I just finished fixing problems now.

Shougo added a commit to Shougo/dein.vim that referenced this pull request Aug 31, 2020
k-takata added a commit to k-takata/minpac that referenced this pull request Aug 31, 2020
k-takata added a commit to k-takata/minpac that referenced this pull request Aug 31, 2020
Import a part of changes from junegunn/vim-plug#937 by @mattn.

When a user checked out a tag, the `HEAD` file may directly contain the
commit ID.
@junegunn
Copy link
Owner

junegunn commented Aug 31, 2020

@mattn

But others are timed-out. (over 10min)

Tests are passing only with vim-nightly. Looks like your code uses features that are not available on older Vim versions (for example, there is no trim() in Vim 7.4), and we are not planning to drop support for Vim 7.4.

Also, we don't use l: prefix in our code. Please remove them for consistency.

@mattn
Copy link
Contributor Author

mattn commented Aug 31, 2020

ok. will fix tonight

@mattn
Copy link
Contributor Author

mattn commented Sep 3, 2020

Fixed

@junegunn
Copy link
Owner

junegunn commented Sep 3, 2020

Thanks, but as you can see, tests are not passing. You can run the tests locally with test/run script.

Test hangs here with Delete all directories? (y/N) prompt.

@mattn
Copy link
Contributor Author

mattn commented Sep 3, 2020

Can I make sure where test hangs from CI output?

@junegunn
Copy link
Owner

junegunn commented Sep 3, 2020

Unfortunately, no. Vader prints the report only after the whole test is finished.

Looks like :PlugClean is broken. Does it work as expected on your setup?

@mattn
Copy link
Contributor Author

mattn commented Sep 3, 2020

Local test stop at same.
image

@mattn
Copy link
Contributor Author

mattn commented Sep 8, 2020

@junegunn Thank you.

Copy link
Owner

@junegunn junegunn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests are passing now. (s:trim() is not a replacment for trim())

plug.vim Outdated Show resolved Hide resolved
@junegunn junegunn merged commit b17f477 into junegunn:master Sep 8, 2020
@junegunn
Copy link
Owner

junegunn commented Sep 8, 2020

Merged, thanks for your patience. I can definitely feel the difference in the overall performance even though I'm not on Windows.

@mattn
Copy link
Contributor Author

mattn commented Sep 8, 2020

Thank you

zgpio added a commit to zgpio/brew.nvim that referenced this pull request Nov 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants