-
-
Notifications
You must be signed in to change notification settings - Fork 390
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
Helm freezes ("select face" for "highlight-phrase") #967
Comments
It did not occur for me with Emacs 24.4. Do you still ust |
Yeah, I've disabled workgroups since our previous discussion. I've been able to reproduce this problem twice in helm.sh; the linked archive includes a recipe. It seems to occur at around 10 highlight commands, with un-highlight commands probably counting towards that if used (though I didn't bother with them in the latest recipe). |
Tory S. Anderson notifications@github.com writes:
Try: (add-to-list 'helm-completing-read-handlers-alist Thierry |
@thierryvolpiatto that doesn't seem to help. |
Tory S. Anderson notifications@github.com writes:
So the problem should not be related to helm but maybe to font-lock or Thierry |
Looks like a emacs bug in the regexp used by hi-lock, I got a stack overflow error using it, but again not an helm bug, helm is in charge of completing the face to use to font-lock no more and if all cpu is used to font-lock previous regexps, helm become slow. |
Turning off helm-mode completely fixes the problem, so helm is involved. Actually,
helps for me, it reduces the delay significantly, though not completely. I've recorded the backtrace frames from the debugger after having let debug-on-quit fire when the delay appeared. I'll send this backtrace to Thierry by mail because it's too large to paste it here. I see that in the source helm builds, the byte-code of the candidate-function is larger than 3 megabytes (!). I'm not yet sure why, but this is definitely not a font-lock thing. |
I can try to investigate further, but only if @thierryvolpiatto is interested in fixing. |
I tried to investigate. The good news first: I've found a simple recipe from helm.sh:
Put it in scratch and eval with C-x C-e and hit G-g at the prompt. Do this again and again, a 15 times or so. The first time it willl be quite fast, but it seems to take twice the time as before at every attempt. Soon, it will take several seconds, etc. The cause seems to be that
gets doubled at each call, though obarray doesn't get larger. At the end, "all-completions" returns nearly a million matches, though obarray has only 1511 entries. The long completion list is what makes helm so slow. That "all-completions" returns so many "matches" makes no sense. Seems like a bug in Emacs. Maybe I can find a recipe to reproduce the problem without helm. |
Michael Heerdegen notifications@github.com writes:
Thanks to investigate, I will not have access to a computer in the next Thierry |
Ok, have a nice time! |
Update: I found out that the growth of obarray happens when calling "helm-comp-read-get-candidates". Looks indeed like a bug in Emacs to me, since our code looks sane. Here is the discussion in emacs-dev: https://lists.gnu.org/archive/html/emacs-devel/2015-04/msg00194.html |
Stefan Monnier has now commited a fix to master (i.e. Emacs 25) that should fix the issue: Commit 66ae3cf from April 15. It works for me. |
Michael Heerdegen notifications@github.com writes:
Great, thanks for your work on this. Thierry |
This morning during my studies I was using
highlight-phrase
. Each time I used the command it became slower, until after about five times Helm effectively froze (I had to use C-g to escape). Other helm processes did not seem to be slowing down;M-x
andC-x b
were still full speed. The actual freezing occurred at the point where the command is preparing the list to ask what face you would like to use to highlight the phrase; it was fine the first time, then slower and slower until I could wait a full minute with no response. Killing all helm buffers did not effect it. Here is a profiler of the time, which shows 99% CPU usage on the funcall-interactively (use profiler-find on the .txt file):http://www.toryanderson.com/files/profiler-helm-freeze.txt
Any ideas?
The text was updated successfully, but these errors were encountered: