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
Do initial parsing in a background thread #242
Comments
Hi, Unless I'm missing something, we do the initial parsing in a background thread :). However, quite recently, that background thread wasn't running due to a bug in vim. See: http://code.google.com/p/vim/issues/detail?can=2&start=0&num=100&q=&colspec=ID%20Type%20Status%20Priority%20Milestone%20Owner%20Summary&groupby=&sort=&id=103 Even without that, we shouldn't block the main thread and we're regularly polling vim to see if the current completion should be cancelled or not (it doesn't seems to work for me however…). Are you saying that you cannot cancel a completion and so you're forced to wait for it to finish? |
So, to clarify: this is not about completions (completions work nicely in Thanks, On Sat, Jan 19, 2013 at 3:20 AM, Xavier Deguillard <notifications@github.com
|
On 01/19/2013 09:47 AM, r4nt wrote:
Yes, the title of this bug report is misleading. As far as I understand I don't see a problem accepting a patch that improves when using slow CompilationDatabase.fromDirectory or |
Ah, sorry for the confusion :) getCompileCommands is the slow call...
|
OK. I see. We should probably move the getCompileCommands call into the warmup thread. This requires some more changes as we can not call vim from within the thread, so we need to make sure the other parameters are properly propagated into and out of the thread. |
Do you think there's a "quick-and-dirty" hack I can do to fix this up, or Thanks! On Sat, Jan 19, 2013 at 1:52 PM, Tobias Grosser notifications@github.comwrote:
|
@r4nt: Let me try to quickly hack something, we'll see if that solves your problem |
@r4nt Could you try the code that I pushed to the branch compilation-database-background? There is probably lots of issues, but it should in theory work :). |
Much better - very cool, thanks! I'll work with that from now on and let On Mon, Jan 21, 2013 at 8:35 PM, Xavier Deguillard <notifications@github.com
|
I have one more problem: On Tue, Jan 22, 2013 at 10:42 AM, Manuel Klimek klimek@box4.net wrote:
|
One more problem: Happens sometimes now, and only goes away when restarting vim. Cheers, On Tue, Jan 22, 2013 at 10:52 AM, Manuel Klimek klimek@box4.net wrote:
|
So, one more thing: the threaded retrieval of the command line options On Tue, Jan 22, 2013 at 1:55 PM, Manuel Klimek klimek@box4.net wrote:
|
@r4nt, this is a long time issue, and will continue to be while the |
@r4nt. What is the path to the clang builtin includes, and what is the path to libclang itself? |
On Wed, Jan 23, 2013 at 6:36 AM, Xavier Deguillard <notifications@github.com
In ~/.vimrc; I tried before my pathogen setup and afterwards, but I still
I tried a while longer and cannot reproduce it ... (not sure whether that's
|
On Thu, Jan 24, 2013 at 4:40 PM, Tobias Grosser notifications@github.comwrote:
I'm using special paths for both, so in my ~/.vimrc I have: |
I now get the error: On Thu, Jan 31, 2013 at 7:30 AM, Xavier Deguillard <notifications@github.com
|
Indeed… It's fixed now. |
Works, but now it seems like I get stuff running in the main thread again - On Fri, Feb 1, 2013 at 4:55 AM, Xavier Deguillard
|
FWIW this needs a vim patch applied, see ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.786 |
@r4nt: I should definitively stop pushing code when I'm tired… It should be ok now. |
I work at Google where we have an internal build system. We have a version of libclang that integrates with that build system, but it has (often) significantly higher runtimes than libclang on a small project.
It would make clang_complete much more useful to me, if it never blocked the main thread, even while opening files.
The text was updated successfully, but these errors were encountered: