Skip to content
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

Slow Helm window and frame popup on Emacs 26+ #1976

Closed
Ambrevar opened this issue Mar 1, 2018 · 30 comments
Closed

Slow Helm window and frame popup on Emacs 26+ #1976

Ambrevar opened this issue Mar 1, 2018 · 30 comments
Labels

Comments

@Ambrevar
Copy link
Member

Ambrevar commented Mar 1, 2018

Expected behavior

Any Helm window should popup instatenously as with Emacs 25.3.

Actual behavior (from emacs-helm.sh if possible, see note at the bottom)

There is a noticeable lag (about 100-500 ms) when Helm windows pop up.

Steps to reproduce (recipe)

M-x helm-find-files, M-x helm-mini, anything.

Describe versions of Helm, Emacs, operating system, etc.

  • Emacs 26.0.91
  • Helm: MELPA master.
  • OS: Void Linux.

Are you using emacs-helm.sh to reproduce this bug (yes/no): yes

@thierryvolpiatto
Copy link
Member

thierryvolpiatto commented Mar 1, 2018 via email

@thierryvolpiatto
Copy link
Member

I can't reproduce the lag with helm windows (or I don't see it), but with frames easily, the lag is about 1s before something is displaying in helm window whereas in emacs-25 it is instant.

@Ambrevar
Copy link
Member Author

Ambrevar commented Mar 2, 2018

The delay varies, sometimes it's barely noticeable, sometimes it's outright annoying.
It seems to depend on the context, but I'm not quite sure what impacts it. I've never had this issue on Emacs 25.

I'll try to work it out.

@Ambrevar
Copy link
Member Author

Ambrevar commented Mar 2, 2018

Note that I am on EXWM.

@Ambrevar
Copy link
Member Author

Ambrevar commented Mar 2, 2018

OK, after more testing I think it's an EXWM issue. Let's leave this open until I get confirmation.

@thierryvolpiatto
Copy link
Member

thierryvolpiatto commented Mar 2, 2018 via email

@thierryvolpiatto thierryvolpiatto changed the title Slow Helm window popup on Emacs 26 Slow Helm window and frame popup on Emacs 26+ Mar 5, 2018
@SwiftLawnGnome
Copy link

I seem to be having this problem too, on emacs 26.0.91. I actually noticed it because I opened emacs in a terminal and helm opened more or less instantly, which made me realize how much lag I've gotten used to in graphical emacs when invoking helm. It's worth noting that I do usually use EXWM, but I'm now in XFCE4 and graphical frames experience the same lag (possibly slightly less) as in EXWM. I also tried running a daemon, but the graphical frames spawned by emacsclient -c still had the delay.

@thierryvolpiatto
Copy link
Member

thierryvolpiatto commented Mar 29, 2018 via email

@thierryvolpiatto
Copy link
Member

Here again the code to try on emacs-25 and 26 to easily see the difference:

(with-helm-in-frame
  (helm :sources (helm-build-sync-source "test"
                   :candidates '("foo" "bar" "baz"))
        :buffer "*helm test*"))

Even with helm-display-buffer-reuse-frame emacs-26 is slower to raise frame than on emacs-25 with helm-display-buffer-reuse-frame nil.

@Ambrevar
Copy link
Member Author

I've reported the issue upstream: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=30995.

@thierryvolpiatto
Copy link
Member

Thanks.
Seems this issue have been fixed upstream by commit 2a192e2 done by @npostavs

@thierryvolpiatto
Copy link
Member

Issue is fixed for me with frames, do you still have slowness with windows ?

@Ambrevar
Copy link
Member Author

Ambrevar commented Apr 4, 2018 via email

@SwiftLawnGnome
Copy link

Issue is fixed for me with frames, do you still have slowness with windows ?

I just built from master and opening a helm window is now next to instant. I don’t know how I put up with it on the alpha build quite honestly. Emacs in general seems a bit snappier, but that might be either placebo or just a result of helm itself being so much faster.

@npostavs
Copy link

npostavs commented Apr 4, 2018

I expect that doing (setq x-wait-for-event-timeout nil) should fix the issue on Emacs 26 as well.

@thierryvolpiatto
Copy link
Member

thierryvolpiatto commented Apr 5, 2018 via email

@Ambrevar
Copy link
Member Author

Fixed indeed!

@Ambrevar
Copy link
Member Author

Thank you @npostavs!

@zaeph
Copy link

zaeph commented May 30, 2018

Hello,

Following emacs’s 26.1 release, I’ve been experiencing the delays described in this issue.

There’s a significant hang running the following code (mentioned above):

(with-helm-in-frame
  (helm :sources (helm-build-sync-source "test"
                   :candidates '("foo" "bar" "baz"))
        :buffer "*helm test*"))

It happens both when calling helm in windows (e.g. helm-mini) or frames (e.g. code above).

Could someone look into it to see if they can reproduce it?

(I’m new to GitHub, so please excuse me if it’s not proper to comment on a closed issue.)

@thierryvolpiatto
Copy link
Member

So on emacs-26 please follow @npostavs advice:
(setq x-wait-for-event-timeout nil)

Thanks.

@Ambrevar
Copy link
Member Author

Now that Emacs 26.1 is out, should we make this more explicit?
I would at least include it in the installation section of the readme.
What about setting it by default, in helm-config.el or maybe in (helm-mode)?

@thierryvolpiatto
Copy link
Member

thierryvolpiatto commented May 30, 2018 via email

@thierryvolpiatto
Copy link
Member

@Ambrevar
Copy link
Member Author

Thanks!

@starenka
Copy link

I expect that doing (setq x-wait-for-event-timeout nil) should fix the issue on Emacs 26 as well.

man, this speeds up my helm million times! kudos!

@nephewtom
Copy link

nephewtom commented Feb 14, 2019

Guys, do you know that setting

(setq x-wait-for-event-timeout nil)

makes Emacs on Microsoft Windows 10 unusable?

"GNU Emacs 26.1 (build 1, x86_64-w64-mingw32) of 2018-05-30"

@npostavs
Copy link

do you know that setting (setq x-wait-for-event-timeout nil) makes Emacs on Microsoft Windows 10 unusable?

I didn't know that, please report it to bug-gnu-emacs@gnu.org; if you can check a 26.2 pretest that would be helpful too.

@nephewtom
Copy link

I didn't know that, please report it to bug-gnu-emacs@gnu.org; if you can check a 26.2 pretest that would be helpful too.

How do I get a 26.2 pretest emacs for Windows?
I can't find it in any of those:

@npostavs
Copy link

Try https://alpha.gnu.org/gnu/emacs/pretest/windows/emacs-26/, (26.1.91 is the current pretest for 26.2)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants