Skip to content
This repository

Only enable the Warmup cache when debug is enabled for now. #235

Closed
wants to merge 1 commit into from

3 participants

Xavier Deguillard Francisco Lopes Tobias Grosser
Xavier Deguillard
Owner

On issue #216, the code doesn't seems to be executed in background, but at exit time...

Xavier Deguillard Only enable the Warmup cache when debug is enabled for now.
The code doesn't seems to be executed in background, but at exit time...
b9b0491
Francisco Lopes

??? == this

Tobias Grosser
Collaborator

This patch looks like an ugly hack. ;-)

I remember there have been several problems with the Warmup cache code and I agree it may make sense to make the use of it optional. But why don't you add a normal option for this?

Making this part of debug mode seems problematic, as enabling debug mode will now change the behavior of clang_complete, instead of just printing additional information.

Xavier Deguillard
Owner

I know that it's ugly :). I don't plan to merge it to master anyway.

Thinking about debug mode, maybe we should introduce some experimental mode, that may be unstable and/or known not to work, and put that WarmupCache under it. What do you think?

Tobias Grosser
Collaborator

Instead of an experimental mode, I would add an individual option (off by default) that is marked experimental. The problem with a generic experimental mode is that we may have different experimental options, such that improving/testing one may be different if the others cause too much trouble.

Xavier Deguillard
Owner

Closing this, as the bug in vim was fixed.

Xavier Deguillard Rip-Rip closed this February 16, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

Jan 14, 2013
Xavier Deguillard Only enable the Warmup cache when debug is enabled for now.
The code doesn't seems to be executed in background, but at exit time...
b9b0491
This page is out of date. Refresh to see the latest.

Showing 1 changed file with 3 additions and 2 deletions. Show diff stats Hide diff stats

  1. 5  plugin/libclang.py
5  plugin/libclang.py
@@ -437,8 +437,9 @@ def run(self):
437 437
 def WarmupCache():
438 438
   global debug
439 439
   debug = int(vim.eval("g:clang_debug")) == 1
440  
-  t = CompleteThread(-1, -1, getCurrentFile(), vim.current.buffer.name)
441  
-  t.start()
  440
+  if debug:
  441
+    t = CompleteThread(-1, -1, getCurrentFile(), vim.current.buffer.name)
  442
+    t.start()
442 443
 
443 444
 
444 445
 def getCurrentCompletions(base):
Commit_comment_tip

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.