-
Notifications
You must be signed in to change notification settings - Fork 89
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
jedi.el seems to be causing my Emacs to hang every 15-20 minutes on my Mac OSX machine #239
Comments
Which emacs version do you use ? |
Initially, 24.3.1. Then, I tried the latest version of GNU Emacs: 24.5.1. It seemed to have the same buffer freezing issue. At first, I tried to ignore it. But then, after it had happened about a dozen times over a couple days, I realized it was getting a bit too annoying to deal with. Also, I had two separate Emacs instances running some of the time, with a different Python source file in each Emacs instance. I don't know if this is relevant or not. I think it froze even when I just had the one instance running. |
Emacs 24.3 has timer bug which causes Emacs hangs up, however this issue is occurred on Emacs 24.5, this is not related to timer bug. Is this issue occurred without |
I was able to get an Emacs debug stack trace just now. It looks to me like you are using process-send-string to send the entire contents of the edit buffer to the jedi server. For me, this threshold seems to be reached with an edit file of about 16K. Which, by most programming metrics, is a fairly small sized file. So, it looks like it's not so much that Emacs is hanging, but Emacs ends up slowing down to a crawl due to the repeated full buffer parse requests being sent to the jedi server. Just my two cents, but could it be that the time complexity issues of larger edit buffer sizes is basically causing jedi.el to slow down to a crawl ? If my theory is basically correct, then most likely jedi.el can only reasonably be used on edit buffers under 10K. Does the jedi api support interactive editing without necessitating a full send of the buffer contents ? I would imagine there are 2 significant factors at play here: 1) the transmission time to send over the buffer contents; 2) the time for the jedi server to reparse the buffer contents. When parts 1 and 2 are done iteratively and frequently, again, it seems to me that this would inherently involve significant time complexity bottlenecks. |
I'm also seeing this, increasingly frequently in recent months. Even on relatively small (~1000-line) buffers. |
I'm able to reproduce this on macOS Sierra (10.12.6), Emacs 25.2.1 (from emacsformacosx.com) by opening a new Python file and entering:
After Jedi version: 20160425.2156 (I'll attempt to eliminate confounding variables in my setup in the next day or two.) |
Confounding factor: I was attempting to use Fira Code's ligatures, which are currently known to cause similar problems. Disabling them cleared up my particular issue. |
+1 on Fira. Used to mess up way too many things including edts, magit and jedi. Disabled the font and things are great again. |
Hi all, could you please try out the latest version and see if the issue persists? |
+1 Persists. |
@appetrosyan could you try adding
to the config and check the $HOME/jediepcserver.log.* files for clues regarding what's happening? |
I was using jedi.el with popwin and jedi-direx, but when I was editing python files, my Emacs buffer would mysteriously freeze from time to time. If I press C-g to abort a couple times, Emacs would unfreeze for a short period of time, then freeze again.
using the (setq debug-on-quit t) feature, I took a look at the stack trace when it was mysteriously freezing. looks like it's freezing on the epc package's rpc call.
What's mysterious is that auto-completion and browse to definition seem to work fine for 10-15 minutes, at least until the buffer freezes. BTW, 10-15 and 15-20 minutes are somewhat arbitrary numbers I picked. It's definitely freezing at least a couple times within an hour, possibly more.
In any case, although I like the featureset of jedi.el, due to the mysterious freezing, I've decided to switch to using ropemacs for the time being..
The text was updated successfully, but these errors were encountered: