-
Notifications
You must be signed in to change notification settings - Fork 102
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
company-mode poor performance with large completion candidates #217
Comments
@liujoey Thank you for your detailed bug report. I'll look into this. |
You made my day. I had been using emacs eclim because it was the only useful java tooling in emacs, but I had always been frustrated with the slow performance. After removing the eclim--accepted-p call and recompiling it runs smooth as butter. I have no idea what eclim--accepted-p actually does, and honestly I don't care. The experience is SOO much better now. |
this function will check if the file you are editing is actually managed by a eclim project, which I think is not necessary. Inside the function, it will eventually trigger a file save action which leads to the slowness. |
@liujoey Ok, so I don't want to drop completely this code but I'm able to make it faster. I'll shortly prepare some fix for that and then you can check whether it's fine. |
As a proof. Before:
After:
Check this PR #237 |
now it's not completing at all. I'm using company mode if it is matter. BTW: I didn't drop the entire function, I just removed the call from company mode. This line |
Yes I know that, but I think the point raised in #163 is valid so I'd like to keep the call in here as well. I don't expect it to break any completion, but I'll check it |
Can you update whole eclim and then check once again? |
does eclim version matter? I'm running Eclipse Luna and eclim 2.4.1. I've updated the whole plugin, but still not getting any completion. When I tried to debug the |
I was thinking about emacs-eclim only. Sorry for confusion The only function that have this (defun edebug-match-lambda-expr (cursor)
;; The expression must be a function.
;; This will match any list form that begins with a symbol
;; that has an edebug-form-spec beginning with &define. In
;; practice, only lambda expressions should be used.
;; I could add a &lambda specification to avoid confusion. How do you try to debug it? |
I was trying to debug function Then I tried to debug function Please excuse me about my bad emacs knowledge, really have no time to dive into elisp at this moment, project dead line right ahead you know :) What I'm trying to do is providing you information as much as I can. Thank you. |
I searched every where but couldn't find a solution, so I guess it's best to open an issue here. What I experienced is better provided by an example:
The issue is very general, here is just an example. The Assert class has about more than 30 overrides of
assertEquals
. When I typeAssert.
the company-mode pops up a list and then I start to typeassert
. While I'm typing, the performance of typing drops down to like a 'Power Point Slide'. Every key I type will delay 2-3 seconds, looks like the company is updating the completion list every time.When I run profiler, lot of CPU time is spent by
eclim--accepted-p
:So the question will be, do we need to query eclim every time when we narrow down the list? Since the first query already get a full list of all candidates, so should following actions just reuse what ever in memory and avoid to communicate with eclim?
PS: I'm completely new to lisp programming, I might be wrong from any perspective.
EDIT:
By removing the function call of
eclim--accepted-p
, all performance issues I've experienced so far are removed. This function call was first introduced via #163The text was updated successfully, but these errors were encountered: