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 omnicompletion for object members #174

Open
igemnace opened this issue Jul 27, 2017 · 2 comments
Open

Slow omnicompletion for object members #174

igemnace opened this issue Jul 27, 2017 · 2 comments

Comments

@igemnace
Copy link

I have an object with multiple properties:

export const colors = {
  GREEN: '#7fad33',
  DARK_GREEN: '#04bb79',
  LIGHT_GREEN: '#b0cc7f',
};

When I type colors.<C-x><C-o> to omni-complete these properties, it takes a few good seconds to load the results. During this time, my editor is blocked and I cannot take any further actions. This happens for a 27-line file consisting of only two objects: colors and fonts.

My issue displays the same symptoms as #60, so I followed the steps in that issue first. Notably, I ran time bin/test from within my tern folder. The results are:

Ran 597 tests from 100 files.
All passed.
bin/test  12.42s user 0.37s system 116% cpu 11.007 total

On the other hand, the demo on http://ternjs.net/doc/demo.html works very quickly for me.

This happens with tern_for_vim running as the only completion plugin (no YouCompleteMe) so I cannot apply the same solution as in the linked issue.

From your instructions in that issue, I understand that the problem is on the node side. What steps can I take to correct this on my machine?

@marijnh
Copy link
Member

marijnh commented Jul 27, 2017

Could you show the whole file that causes the slowdown? What does your .tern_project look like?

@igemnace
Copy link
Author

I've uploaded the JS file and my .tern_config to Gist (I don't have a project-specific .tern_project): https://gist.github.com/igemnace/2c98d36aa41b15c487c6df706fed56e5

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

2 participants