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

Causing noticeable lag for large files #37

Open
rileytomasek opened this issue May 25, 2015 · 14 comments
Open

Causing noticeable lag for large files #37

rileytomasek opened this issue May 25, 2015 · 14 comments

Comments

@rileytomasek
Copy link

I have been experiencing pretty serious lag on large JS files while using this plugin. I tried running with with just this plugin and no other plugins and it is making things, specifically moving up and down with j/k very laggy. Is there anything I can try to fix this, or anything I might not be thinking about here? Thanks!

@othree
Copy link
Owner

othree commented May 25, 2015

Could you provide sample file and your environment(hardware and software)
It's strange the lag occurs when cursor moves, not edit.

@othree
Copy link
Owner

othree commented May 25, 2015

Line of codes is also a useful information.

@susu
Copy link

susu commented Jul 20, 2015

From #46:
Sample file

Environment
OS: Archlinux, Kernel: 4.0.7-2-ARCH, 64bit
vim 7.4, Included patches: 1-778
CPU: Intel(R) Core(TM) i5-3230M CPU @ 2.60GHz
RAM: 4 GB

Let me know if I can provide any further information!

@othree
Copy link
Owner

othree commented Jul 20, 2015

I am running iTerm 2 on OSX, and it works fine here.
Will try linux later.

@othree
Copy link
Owner

othree commented Jul 21, 2015

On my ubuntu is ok too.
Could you provide vimrc file.
Maybe it cause by other plugin (not working well together with yajs.vim)

@susu
Copy link

susu commented Jul 21, 2015

It seems I've found the culprit:

set cursorline

For completeness, cursorline has colors (but it was lagging even without these colorings):

highlight CursorLine term=none cterm=none ctermbg=0
highlight CursorLineNr cterm=none ctermbg=4

However lag only happens when both yajs and cursorline are enabled.

Thanks for your efforts!

@sondr3
Copy link

sondr3 commented Nov 6, 2015

I've ran into this issue with Neovim and disabling yajs.vim makes it work smoothly again. My init.vim is in my dotfiles repo and disabling cursorline doesn't work either.

@simonlc
Copy link

simonlc commented Nov 24, 2015

I have the same issue, using iTerm 2 with cursor line disabled. It happens on most of my files, and very noticeable lag on a 150 line "dense" file. I reverted back to pangloss/vim-javascript for now.

@FuzzOli87
Copy link

@susu I just recently ran into this issue with "dense" files. Such as deep nested objects. After much playing around, I turned off cursorline and now it's smooth as butter.

@othree
Copy link
Owner

othree commented Feb 18, 2016

Since I don't have machine can have noticeable lag now.
Can anyone help do some test?
I want to figure out which part impacts most.

I will have some branches and need tester to switch to those branches to see is there any improve.

@susu
Copy link

susu commented Feb 18, 2016

In the meantime, I have a new job, with a faster laptop, and I cannot reproduce it anymore. CPU usage goes up to ~50%, but no lag. So I'm afraid I could not help.

@othree
Copy link
Owner

othree commented Feb 18, 2016

@susu Thank you anyway.
Actually still one thing you help.
You could provide your new laptop's spec.
Maybe we can find out what hardware have more problem on this.

@susu
Copy link

susu commented Feb 18, 2016

@othree Sure, here it is:
OS: Archlinux, Kernel: 4.4.1-2-ARCH, 64bit
vim 7.4, Included patches: 1-1294
CPU: Intel(R) Core(TM) i7-5600U CPU @ 2.60GHz
RAM: 16GB

@psaia
Copy link

psaia commented Jun 3, 2017

I'm also experiencing serious lag, loss of syntax highlighting when folding, or just oddly highlighted variables on more complex files. Usually, when JSX is involved, but not always. The lag is definitely the largest issue though. I'm also not setting cursorline specifically, but another plugin I'm using could be. Here is my .vimrc if that helps.

Switching back to the isRuslan/vim-es6 and manually setting colors for await, yield, async, ect. works for now.

screen shot 2017-06-03 at 12 12 40 pm

More info for debugging:

ITerm2
VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Feb 21 2017 13:11:26)
MacOS X (unix) version
Included patches: 1-344

MacBook Pro (Retina, 13-inch, Early 2013)
2.6 GHz Intel Core i5
8 GB 1600 MHz DDR3

I hope that's helpful. Would love to see this become the go to js syntax plug.

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

7 participants