emacs-ycmd icon indicating copy to clipboard operation
emacs-ycmd copied to clipboard

Timeouts

Open gnzlbg opened this issue 10 years ago • 12 comments

I've noticed that emacs-ycmd freezes my emacs way to often, sometimes for > 60s which is kind of annoying.

Would it be possible to have an user-configurable time out?

I would like to set it up so that if ycmd doesn't respond successfully in less than 1 second, that emacs-ycmd reports a completion error so that e.g. company-mode can try something else.

gnzlbg avatar Oct 20 '15 09:10 gnzlbg

I cannot reproduce your issue, even on a large c++ project. Could you be more specific about your issue. What is causing the freeze exactly? Do you have any other mode activated?

ptrv avatar Oct 20 '15 10:10 ptrv

btw, there is the variable ycmd-request-timeout (in third-party/ycmd-request.el) you could experiment with. But I am not sure whether your "freeze" is related to the request.

ptrv avatar Oct 20 '15 10:10 ptrv

I'm using it from spacemacs with company. It happens when I use yasnippet to insert a new namespace. When I type ns + yas-expand, that expands to namespace $name { } // namespace $name, and while I'm editing the snippet variable $name emacs freezes (disabling emacs-ymcd fixes the freeze).

EDIT: thanks! I will try that variable and see if that helps!

gnzlbg avatar Oct 20 '15 10:10 gnzlbg

@gnzlbg Would it be difficult for you to try things out in a vanilla (i.e. not spacemacs) emacs? We've had a number of issues that only arise in spacemacs, so I'd like to isolate that variable if possible.

Also, do you see anything suspicious in *Messages*?

abingham avatar Oct 20 '15 10:10 abingham

@abingham Maybe I should open an issue in the spacemacs repo instead since this might be due to the interaction of emacs-ycmd with yasnippet/company-clang and the other 100 things that the spacemacs c++ layer has. I think it is very likely that if I just use vanilla emacs with emacs-ycmd everything will work fine since @ptrv doesn't have any of these problems.

I will try to figure out (from the message log I guess) if the freezes are related to the ycmd requests and see if i can work around it with ycmd-request-timeout.

gnzlbg avatar Oct 20 '15 11:10 gnzlbg

OK, yeah, you're in a tough spot. My guess is that this is more of a spacemacs issue than an emacs-ycmd one, and ultimately it may be a result of issues in both camps :-\ I should probably just keep a spacemacs installation handy for looking at this kind of stuff.

abingham avatar Oct 20 '15 11:10 abingham

@gnzlbg Did you ever get any resolution to this issue? I'm just doing some project house-cleaning.

abingham avatar Dec 28 '15 11:12 abingham

@abingham Not really, I basically gave up :/

gnzlbg avatar Feb 02 '16 16:02 gnzlbg

@gnzlbg What is the value of ycmd-parse-conditions? Do you have the entry idle-change in the list?

ptrv avatar Feb 02 '16 17:02 ptrv

describe-variable outputs the following:

ycmd-parse-conditions is a variable defined in `ycmd.el'.
Its value is (save new-line mode-enabled)

gnzlbg avatar Feb 03 '16 09:02 gnzlbg

ok, it was just a guess that maybe you have the idle-change entry which causes a buffer reparse every time you change the buffer. Unfortunately I have no clue here

ptrv avatar Feb 03 '16 09:02 ptrv

For me, I noticed that using ycmd-eldoc on file types that are not recognized by ycmd, produces occasional freezes that is breakable by C-g. Try disabling ycmd-eldoc-mode.

TommyX12 avatar Sep 19 '18 23:09 TommyX12