Closed fasterpython closed 10 years ago
You probably have an error in your include files which is preventing Clang from creating a precompiled preamble. This is why your calls to ycmd are timing out.
There is no option to change the timeout value because you should never need it to be higher than 0.5 seconds. If that's not high enough, you have a different problem you need to fix.
The project can be compiled sucessed without any warnings or errors. How to find out the error you said “ You probably have an error in your include files which is preventing Clang from creating a precompiled preamble. ” ? Thanks
You're probably not giving YCM the correct compilation flags.
I met the same problem. Sometimes it shows "Still parsing file, no completions yet". How could I debug it?
And, auto-compete worked well in previous ycm version, with the same .ycm_extra_conf.py for my project.
This happens in python projects as well, so I don't think it has something to do with clang.
This also happens when using Numpy, are there anything we can do to avoid this?
also happens in python when using panda,what can i do to fix it?
In my computer, it happens with most of python imports: os, re, requests, beautiful soup, selenium, i could go on and on. I had actually stopped using ycm and started using jedi-vim because of this annoying error, but i actually like the fuzzy completion. I think i will do what @tortoisechan suggested on #777 and see how that goes. But then again, why not making this an option to be set at one's vimrc?
Same problem here, python projects.
@mzavoloka thanks for the report. However, this is a very old issue related to the C++ semantic engine.
If you're having problems with YCM, I'd suggest you follow the instructions in CONTRIBUTING.md
. and raise a new issue. While, we're always willing to help, unfortunately, responses like "this is still a problem in [potentially different scenario]" don't help us diagnose the original problem. Val suggested the original problem was probably with compiler flags, which is certainly a possibility, but would not be relevant to Python or OmniSharp completers.
In order to really understand why this is affecting your systems (it has literally never happened for me!), we need as much diagnostic data as we can.
From CONTRIBUTING.md:
If we can't reproduce the issue, then we can't fix it. It's that simple.
Same problem, a Python script linked to Matplotlib.
import matplotlib.pyplot as plt
nums = [[i, i] for i in range(100)]
plt.plot([i[0] for i in nums], [i[-1] for i in nums], 'bo')
plt.show()
@art-solopov does it happen only on the first try or always?
I must confess that I often get timeouts at work. Typically you just keep typing and then get completion from the cache, or hit <ctrl-space>
after getting bored waiting for completions to arrive.
@puremourning I was asking because for python usually the slownes is just for the first .
because it has to load the module, and then is fast because it has it in cache. So I was thinking of adding the OnFileReadyToParse
to the jedi_completer to preload the imports in the file. Just an idea, I don't even know if it would help :stuck_out_tongue_closed_eyes:
neat idea
@vheon It's weird. With plt.
from my first example, it happens always. If I write import matplotlib
, then save, and then write matplotlib.
, the completion works.
@art-solopov so you do plt.
and you get the timeout; then if you delete the .
and re-type it you get the timeout again?
If I write import matplotlib, then save, and then write matplotlib., the completion works.
but what happen after you use matplotlib.pyplot.
?
Note that I also see this happening with gocode when triggering completion on large namespaces (fmt. / ioutil.)
@r4nt's comments relates with this comment I've posted on https://github.com/Valloric/YouCompleteMe/issues/777#issuecomment-236626561.
I'm adding another context where I see timeouts: having a rich C++ code (GCC source files) and running a make that utilizes all CPUs can increase duration of Completion requests. I would still consider it usefull to have a g:ycm_* option, however editting completion_request.py works for me.
Adding time duration of particular requests is also usefull for me. If the patch is desired for master, I can prepare a patch?
My project uses Boost that is slow for compiling. I have compiled 'ycm_support_libs' said in the doc, but it seems not much help.
Now ycm is always timeout at trying auto-compete, with message below:
HTTPConnectionPool(host='localhost', port=37075): Read timed out. (read timeout=0.5)
If I try a simple project, Ycm just works fine. (With the old version, Ycm might take about 2 seconds to parse and then do auto-complete.)
There is not an option to set how long for timeout, what about add such an option?
I'm using Intel I7 cpu, and my project is not too large (about 3000 lines of code), but it uses Boost. How can I make it fast for YCM while doing auto-complete?