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

Included an option to skip loading helm at startup #2435

Closed
wants to merge 2 commits into from
Closed

Included an option to skip loading helm at startup #2435

wants to merge 2 commits into from

Conversation

ghost
Copy link

@ghost ghost commented Jul 27, 2015

Helm is a fantastic package, but it's not for me. I don't really need 90% of all it can do.
Although I use other packages to replace the other10% (dired+, ibuffer, counsel, swipper, etc...) Spacemacs still loads helm at start up, which depending on the day, adds between 5 or 25 seconds to my emacs startup time (yep, I'm in windows).
So I created a new variable called dotspacemacs-load-helm to allow users skip loading helm at start up. I think it's fair offer users this choice and don't make compulsory load such a heavy package
PS: this is my first pull request ever. Apologies if I haven't done anything correctly.

@syl20bnr
Copy link
Owner

I'm not sure this variable is necessary, you can add helm to dotspacemacs-excluded-packages to achieve the same result.

@robbyoconnor
Copy link
Contributor

☝️ I agree with @syl20bnr here -- the less work to configure, the better.Helm is good.

@ghost
Copy link
Author

ghost commented Jul 27, 2015

I understand this request might sound crazy to Linux users, where helm barely takes 1.5 seconds to load. It's intended for Windows users, where helm can add up to 25 seconds to the start up time and there is no real chance to use tricks like run emacs as a client.

@robbyoconnor Helm is very good indeed! So good that I don't really want to remove it by adding it to dotspacemacs-excluded-packages. By using this variable (which by the way enables helm by default anyway), we're just giving the choice to skip loading it at start up. Helm still will be available without increasing the start up time.

Never the less, I appreciate that there are other issues more important than this, so I'm happy not pursuing this any further. Feel free to close my pull request if you don't find it useful. No worries :-)

@syl20bnr
Copy link
Owner

Ok I understand it better, what you want is to modify :defer 1 to :defer t. :defer 1 will load helm after 1 second of idle time (which is almost like it is loaded at startup).

Here is an alternative:

(use-package helm
    :defer (if (system-is-mswindows) t 1)
...

So on Windows helm will be loaded only when it is required but on other OSes it can also be loaded after 1 second of idle time.

@robbyoconnor
Copy link
Contributor

☝️ 👍 -- I like that.

@justbur
Copy link
Contributor

justbur commented Jul 28, 2015

If it takes 25 sec to load helm something is wrong, even on windows. It takes my windows computer at most 1 sec. Also :defer t will not make the situation better I don't think, since even deferred 25 sec is a lot of time. It would be better I think to rely on autoloads or something like that.

By the way emacs25 on windows now works in daemon mode.

@robbyoconnor
Copy link
Contributor

Windows is shit to begin with 👅

@tuhdo
Copy link
Contributor

tuhdo commented Jul 28, 2015

@justbur do you have an SSD? On my old Windows machine with 5400 RPM HDD, it takes that much amount of time to load Helm, and with Windows 25. On my MacBook, it takes 3 seconds to load everything with 25 layers.

@tuhdo
Copy link
Contributor

tuhdo commented Jul 28, 2015

Oh but this varies since on another newer Windows machine it loads everything with only 6 seconds (still HDD). I guess the 5 years old Windows made the difference.

@sexptherapy
Copy link

In my Linux machine with very poor configuration (i3, 4gb RAM and 5400 RPM HDD), Helm takes +/- a minute to load which is very troublesome to me, especially since I love it!

@tuhdo
Copy link
Contributor

tuhdo commented Jul 28, 2015

Are you using Arch Linux? If so, it is having this issue: emacs-helm/helm#1000. The fix is in that issue report.

@sexptherapy
Copy link

Wow, yes I am! Thanks! At least I know it's a bizarre problem with Tramp (although I've never used it) and that it should be fixed in newer versions.

@justbur
Copy link
Contributor

justbur commented Jul 28, 2015

Yes my ssd probably makes a huge difference of course. I was just surprised
that it could take so long. 25x

I was trying to suggest looking into a specific cause like tramp or
something else that's just timing out.
On Tue, Jul 28, 2015 at 4:08 AM Felipe Barros notifications@github.com
wrote:

Wow, yes I am! Thanks! At least I know it's a bizarre problem with Tramp
(although I've never used it) and that it should be fixed in newer versions.


Reply to this email directly or view it on GitHub
#2435 (comment).

@ghost
Copy link
Author

ghost commented Jul 28, 2015

@syl20bnr The code you suggested works better than mine (no surprises here).
With my code when I type, for example, SPC b b it doesn't work because that keybinding doesn't exist as Spacemacs didn't load the configuration. On the other hand, that keybinding is created with your code, and helm is loaded only at that moment, not at start up. That's exactly what I wanted. Thanks.

@justbur Helm's loading time varies in my computer. When I start my laptop early morning in the office, Helm loads in 5 modest seconds, but as the day goes on and I open more programs, it can be as slow as 25 seconds. I'm using a i3, 8 GB RAM laptop. It's not the software neither the hardware. It's obviously a Windows issue 😄

@robbyoconnor

Windows is shit to begin with 👅

That doesn't really help. I'd like to use my Debian laptop at work but I can't. Thank you for contributing anyway 😉

@syl20bnr
Copy link
Owner

I wonder if we could create a variable to specify a machine profile like
fast, slow and tweak some configurations accordingly. A good start
could be the load time of helm.

-syl20bnr-

On Tue, Jul 28, 2015 at 10:23 AM, RafaelGP notifications@github.com wrote:

@syl20bnr https://github.com/syl20bnr The code you suggested works
better than mine (no surprises here).
With my code when I type, for example, SPC b b it doesn't work because
that keybinding doesn't exist as Spacemacs didn't load the configuration.
On the other hand, that keybinding is created with your code, and helm is
loaded only at that moment, not at start up. That's exactly what I wanted.
Thanks.

@justbur https://github.com/justbur Helm's loading time varies in my
computer. When I start my laptop early morning in the office, Helm loads in
5 modest seconds, but as the day goes on and I open more programs, it can
be as slow as 25 seconds. I'm using a i3, 8 GB RAM laptop. It's not the
software neither the hardware. It's obviously a Windows issue :-)

@robbyoconnor https://github.com/robbyoconnor

Windows is shit to begin with [image: 👅]
That doesn't really help. I'd like to use my Debian laptop at work but I
can't. Thank you for contributing anyway ;-)


Reply to this email directly or view it on GitHub
#2435 (comment).

@justbur
Copy link
Contributor

justbur commented Jul 28, 2015

I was thinking of something along the same lines actually. Even just
minimal or lightweight and full.
That's so strange to me that it could vary so much, but I believe you.
Worth reporting as an issue to helm?

On Tue, Jul 28, 2015 at 10:31 AM Sylvain Benner notifications@github.com
wrote:

I wonder if we could create a variable to specify a machine profile like
fast, slow and tweak some configurations accordingly. A good start
could be the load time of helm.

-syl20bnr-

On Tue, Jul 28, 2015 at 10:23 AM, RafaelGP notifications@github.com
wrote:

@syl20bnr https://github.com/syl20bnr The code you suggested works
better than mine (no surprises here).
With my code when I type, for example, SPC b b it doesn't work because
that keybinding doesn't exist as Spacemacs didn't load the configuration.
On the other hand, that keybinding is created with your code, and helm is
loaded only at that moment, not at start up. That's exactly what I
wanted.
Thanks.

@justbur https://github.com/justbur Helm's loading time varies in my
computer. When I start my laptop early morning in the office, Helm loads
in
5 modest seconds, but as the day goes on and I open more programs, it can
be as slow as 25 seconds. I'm using a i3, 8 GB RAM laptop. It's not the
software neither the hardware. It's obviously a Windows issue :-)

@robbyoconnor https://github.com/robbyoconnor

Windows is shit to begin with [image: 👅]
That doesn't really help. I'd like to use my Debian laptop at work but I
can't. Thank you for contributing anyway ;-)


Reply to this email directly or view it on GitHub
<#2435 (comment)
.


Reply to this email directly or view it on GitHub
#2435 (comment).

@punassuming
Copy link
Contributor

I have wondered this as well; with my two windows machine, helm takes between 5-10 sec to load according to use-package-verbose. Is there a command to run at startup to determine what is taking helm so long to load?

@TheBB
Copy link
Contributor

TheBB commented Jun 18, 2017

At any rate, whatever we do, I do not think we will be merging this as is. Thank you for the contribution though.

@TheBB TheBB closed this Jun 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants