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

YADR is slow. #661

Closed
domi91c opened this issue Sep 15, 2015 · 31 comments
Closed

YADR is slow. #661

domi91c opened this issue Sep 15, 2015 · 31 comments

Comments

@domi91c
Copy link

domi91c commented Sep 15, 2015

I love this repo, but I've had lots of problems with speed. I've tried on a 3.4ghz iMac and a 2.4ghz 2011 Macbook Pro, and both are sluggish when running commands like irb and rails c. Even with cd, I get a quarter to half second delay. Vim takes about two seconds to start. Is this a sacrifice for the large amount of plugins, or am I getting unusually low performance?

I've also noticed that when text has filled the terminal so that the scrollbar must be used, delays becomes longer.

And again, when I'm using plain zsh or bash I get instant output on most commands. I'm not sure what other information to give at this point so just let me know what you need.

@domi91c
Copy link
Author

domi91c commented Sep 15, 2015

I've also tried Prezto on it's own and it runs great, so I can rule that out as well.

@fayimora
Copy link
Contributor

fayimora commented Oct 8, 2015

I remember having these problems 2/3 years ago. The number of plugins certainly slows down vim but this issue disappeared when I switched to an SSD.

Probably not the fix you were looking for but doesn't hurt to know 😃

@ryansch
Copy link

ryansch commented Oct 10, 2015

I've had this problem on and off over the past few years depending on the changes. At the moment I'm struggling with it again. I'll try and figure out how to speed things up and report back.

Edit: I have an SSD 😉

@ryansch
Copy link

ryansch commented Oct 10, 2015

@portOdin Try this branch: https://github.com/ryansch/yadr/tree/ryansch-fast

It's an old branch without about a years worth of changes. It seems much faster to me. If you agree we can bisect from there.

@fullofcaffeine
Copy link

True that, specially after upgrading to El Capitan, vim became quite slow,
haven't had the time to debug it, though.

On Sat, Oct 10, 2015 at 9:19 AM, Ryan Schlesinger notifications@github.com
wrote:

@portOdin https://github.com/portOdin Try this branch:
https://github.com/ryansch/yadr/tree/ryansch-fast

It's an old branch without about a years worth of changes. It seems much
faster to me. If you agree we can bisect from there.


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

@ryansch
Copy link

ryansch commented Oct 13, 2015

I tried out neovim with latest yadr over the weekend. I've changed a few of the plugins but other than that it's working beautifully. I'll post instructions soon.

@fullofcaffeine
Copy link

Ryan, please do!

On Tue, Oct 13, 2015 at 10:26 AM, Ryan Schlesinger <notifications@github.com

wrote:

I tried out neovim with latest yadr over the weekend. I've changed a few
of the plugins but other than that it's working beautifully. I'll post
instructions soon.


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

@ryansch
Copy link

ryansch commented Oct 13, 2015

I'm going to continue the shakedown cruise before I do. No blockers yet but some workarounds required.

@charlimmelman
Copy link

On fresh install of El Capitan. Running new MBP with SSD. I'm experiencing a slight lag while in input mode, especially when vim is suggesting autocompletions.

@nkgm
Copy link

nkgm commented Nov 8, 2015

@charlimmelman with iTerm2 in full screen, vim running with no splits, do you see any lag when scrolling down a large (few hundred lines) file on high key repeat rate? (~20ms)
Is scrolling affected when the NERDTree panel is open?

@charlimmelman
Copy link

@nkgm I installed Karabiner. I set the repeat rate to 20ms. Restarted to ensure. Opened a large ruby file (1480 lines) in Vim / iTerm2. Set to full-screen. Scrolling seems to be nice and smooth. I then opened NERDTree, and it definitely seemed to slow it down a bit, but still useable.

@nkgm
Copy link

nkgm commented Nov 17, 2015

Thanks @charlimmelman. I'm on fresh El Capitan on a 2011 quad I7 MBP. iTerm appears to be consuming twice the CPU (~70%) when scrolling with NERDTree panel visible. Still the lowest CPU I can get on scrolling is ~35%.

@charlimmelman
Copy link

@nkgm My major issue is when in insert mode and holding the left arrow down. That can be super slow. But I think it has to do with the amount of files in my buffer. Also, stuff like using ",mc" then crtl+n and then pressing "c" to change more than one instance can literally cause my whole machine to go into seizure :-)

@fullofcaffeine
Copy link

This has been a major blockage for me lately. I completely stopped using yadr/tmux + vim after updating to El Capitan, and switched to Sublime Text 3. I much prefer working from tmux, but the slowness is unbearable, and sometimes, when opening big files, it reaches a point where it's unusable. Sublime is the fastest editor I've ever used and excels at opening big files.

I even thought about completely wiping out El Capitan and switching to Ubuntu on my macbook pro, but while I like Ubuntu, my workstation has been OSX-based for many years, so switching now would take quite a bit of time until I find replacements for all the OSX software I use.

If anyone has any suggestions on how to get yadr/tmux/vim to a usable state (meaning fast as it should be), please share. For now, I've put htem under suspendend animation, as much as I'd like to keep using them.

Obs: I use iterm2.

@dboshardy
Copy link

@ryansch do you have anything on using neovim? I'm also experiencing slowness in vim and was looking into replacing it with neovim.

@ryansch
Copy link

ryansch commented Jun 29, 2016

I’ve been using it as my daily driver since Oct 2015. Honestly I just need
to clean up my yadr/neovim adapter and push it somewhere.

@dboshardy
Copy link

Is it as simple as symlinking .nvim* to ~/.yadr/vim*, or have you done other tweaks as well?

@skwp
Copy link
Owner

skwp commented Jul 23, 2016

sorry just catching up on here. I've noticed recent slugishness as well. My guess is that it's a combination of various plugins. I haven't tried neovim yet

@ryansch
Copy link

ryansch commented Jul 23, 2016

I've created a gist with my current neovim settings (with yadr installed).

https://gist.github.com/ryansch/e9a8b19dce1926e32ae63ba324e84e79

I've disabled plugins I have no need of and replaced a few with neovim specific ones (fzf instead of ctrlp).

@domi91c
Copy link
Author

domi91c commented Aug 8, 2016

I'm currently just using Prezto, but I've noticed fasd makes ls sluggish. It sucks, because fasd is a massive time saver. Can anyone recommend an alternative?

@kathgironpe
Copy link
Contributor

Any plan to use neovim?

@nkgm
Copy link

nkgm commented Feb 27, 2017

As far as vim redraws go (equally affects neovim), you might want to check #670 (comment)

@katgironpe I've been using neovim for a while now and so far I've observed no discernible speed difference.

@padi
Copy link
Contributor

padi commented Apr 19, 2017

@katgironpe yay for neovim!

As @nkgm said, there's no noticeable speed difference in neovim, perhaps only a few neat features here and there, but roughly the same bottlenecks when I started profiling slow processes. On my end, it's often that the culprit is a ruby-related plugin (e.g. tpope/vim-bundler, vim-ruby/vim-ruby, etc.).

For now, I keep 2 rc files: one for YADR + vim & macvim, and another slimmer custom ~/.config/init.vim for neovim, adding stuff from YADR as I see fit.

https://padi.github.io/articles/profiling_vim/

@kathgironpe
Copy link
Contributor

@padi I kind of like Neovim for Ubuntu. Then I am slowly switching to Spacemacs. What I found is I am maintaining my own dotfiles for Ubuntu, which I should not be doing. It's not much effort. There are no significant differences, indeed. I still use this repo for Mac OS X. And sadly, I have to use Atom Editor too. Don't ask me why.

@lfilho
Copy link
Collaborator

lfilho commented Jun 5, 2017

In my fork I'm also using NeoVim, and I also removed many of the ruby plugins, as I'm not a ruby dev and didn't want to clutter my vim config with so many plugins I wouldn't use. And I have not experienced any speed issues.

I encourage everyone in this thread to profile their vim usages in order to help find the (possible) issue and hence help move this thread move forward.

That being said, the biggest speed advantage for me was moving from Ag to RipGrep. The speed was noticeable. Ctrlp was fast even on a friend's non-SSD machine. I think we are almost there. See the PR I just mentioned above... Help is welcome!

@skwp
Copy link
Owner

skwp commented Jun 5, 2017

Does anyone have a guide to moving yadr to neovim? It doesn't read vimrc by default?

@lfilho
Copy link
Collaborator

lfilho commented Jun 5, 2017

@skwp one of the things we'd need to do is update the nvim config path. I also had to change the vundle initialization path, as neovim uses the XDG Base Directory Specification for application
configuration and data file locations.

Some other issues we'd have to solve before moving to NeoVim:

Personally I'm trying to move to the terminal...

@lfilho
Copy link
Collaborator

lfilho commented Jun 5, 2017

As for a guide of moving Yard to NeoVim... I did it in my fork. But since I decided to stay in the terminal that also meant changing some keymaps to not depend on Cmd key (also thinking about Linux support...).

Also changed some plugins like NeoComplete (to Deoplete), Vundle (to Plug) and many others. After we agree on whether/how to tackle the above points, I could elaborate in more details, maybe a blog post... And then we could cherry pick some commits or create some PRs, one by one...

@lfilho
Copy link
Collaborator

lfilho commented Jun 5, 2017

Also, just so we don't loose sight of the real problem of this thread (YADR being slow), NeoVim won't make things much faster. It's more likely that a (set of) plugin(s) are causing the sluggishness so in order to speed those up (while moving to NeoVim) we would also have to change those plugins for plugins that actually use the advanced features of NeoVim, otherwise I think we might just be inserting another variable in the equation...

In fewer words, we should have other reasons to move to NeoVim instead of just the promise of being (immediately) faster.

IMHO RipGrep and profiling some ruby/rails plugins as suggested above could be promising than the mere switch to NeoVim.

@skwp
Copy link
Owner

skwp commented Jun 6, 2017

I want to close this issue as it's not really a solvable issue but many things interacting together. We can make efforts to make things faster but we need individual issues opened for specific plugins making things "slow" with specific examples.

@skwp skwp closed this as completed Jun 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests