Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

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

Closed
wants to merge 1 commit into from

3 participants

@Rip-Rip
Owner

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

@Rip-Rip 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
@oblitum

??? == this

@tobig
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.

@Rip-Rip
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?

@tobig
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.

@Rip-Rip
Owner

Closing this, as the bug in vim was fixed.

@Rip-Rip Rip-Rip closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jan 15, 2013
  1. Only enable the Warmup cache when debug is enabled for now.

    authored
    The code doesn't seems to be executed in background, but at exit time...
This page is out of date. Refresh to see the latest.
Showing with 3 additions and 2 deletions.
  1. +3 −2 plugin/libclang.py
View
5 plugin/libclang.py
@@ -437,8 +437,9 @@ def run(self):
def WarmupCache():
global debug
debug = int(vim.eval("g:clang_debug")) == 1
- t = CompleteThread(-1, -1, getCurrentFile(), vim.current.buffer.name)
- t.start()
+ if debug:
+ t = CompleteThread(-1, -1, getCurrentFile(), vim.current.buffer.name)
+ t.start()
def getCurrentCompletions(base):
Something went wrong with that request. Please try again.