YouCompleteMe icon indicating copy to clipboard operation
YouCompleteMe copied to clipboard

[READY] Do not send ultisnips snippets on every BufVisit

Open bstaletic opened this issue 3 years ago • 8 comments

PR Prelude

Thank you for working on YCM! :)

Please complete these steps and check these boxes (by putting an x inside the brackets) before filing your PR:

  • [x] I have read and understood YCM's CONTRIBUTING document.
  • [x] I have read and understood YCM's CODE_OF_CONDUCT document.
  • [x] I have included tests for the changes in my PR. If not, I have included a rationale for why I haven't.
  • [x] I understand my PR may be closed if it becomes obvious I didn't actually perform all of these steps.

Why this change is necessary and useful

[Please explain in detail why the changes in this PR are needed.]

Currently YCM gathers and passes snippets on every BufVisit, which seems wasteful. This pull request proposes a change of that, however it means that adding new snippets while editing won't be picked up when that buffer is revisited.


This change is Reviewable

bstaletic avatar Oct 21 '20 23:10 bstaletic

Codecov Report

Merging #3787 (bc83b01) into master (d52a4b3) will decrease coverage by 2.90%. The diff coverage is 16.66%.

@@            Coverage Diff             @@
##           master    #3787      +/-   ##
==========================================
- Coverage   91.19%   88.28%   -2.91%     
==========================================
  Files          26       23       -3     
  Lines        3258     2280     -978     
==========================================
- Hits         2971     2013     -958     
+ Misses        287      267      -20     

codecov[bot] avatar Oct 21 '20 23:10 codecov[bot]

For the record, I made this pull request well after midnight. I might have done something stupid.

bstaletic avatar Oct 22 '20 09:10 bstaletic

:lgtm:

bstaletic avatar Oct 26 '20 21:10 bstaletic

Thanks for sending a PR!

mergify[bot] avatar Oct 26 '20 21:10 mergify[bot]

@mergify refresh

puremourning avatar Nov 09 '20 22:11 puremourning

Command refresh: success

Pull request refreshed

Hey, I reacted but my real name is @Mergifyio

mergify[bot] avatar Nov 09 '20 22:11 mergify[bot]

OK sure, no rush.

puremourning avatar Dec 31 '20 19:12 puremourning

I can't get the test for this thing to work. @puremourning, either we close this or you'll have to get your hands dirty.

bstaletic avatar Apr 28 '21 15:04 bstaletic

I may pick this up in future, as it is a worthwhile performance help (I use a similar hack locally to improve perf). But for now, let's close this as it's unlikely to be merged as is.

puremourning avatar Sep 29 '22 19:09 puremourning