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

tern_for_vim swallowed too much memories #165

Closed
Gabirel opened this issue Apr 5, 2017 · 2 comments
Closed

tern_for_vim swallowed too much memories #165

Gabirel opened this issue Apr 5, 2017 · 2 comments

Comments

@Gabirel
Copy link

Gabirel commented Apr 5, 2017

Environment Information

  • OS: Arch Linux
  • vim version: 8.0(with SpaceVim)

The reproduce ways from Vim starting

editing any files written by javascript.
And you have to enable tern_for_vim and you have to have .tern-project or .tern-config.
Here's the file:

{
  "libs": [
    "browser",
    "jquery"
  ],
  "loadEagerly": [
    "**/*.js"
  ],
  "plugins": {
    "node": {}
  }
}
  1. write var data = fs
    image

  2. add . after fs(Yes, it's very slow)
    image

  3. You shall see these:
    image

NOTE: It starts two process,which swallow about 1G memories for each.(I only have 8G memories, so I can't afford this) Every time you add . after fs, it starts one process.

Also @wsdjeg saysSpaceVim shouldn't be blamed for this, and asked me to start a new issue here.
I don't know whether SpaceVim or tern_for_vim is to blames for.

Here's REF: SpaceVim/SpaceVim#397

@marijnh
Copy link
Member

marijnh commented Apr 5, 2017

loadEargely: ["**/*.js"]

This is probably the problem. If you're using CommonJS modules (which you seem to be), there's no need to load things eagerly. And if you have a huge dependency tree then yes, loading all of it eagerly is going to consume a lot of memory.

@Gabirel
Copy link
Author

Gabirel commented Apr 5, 2017

Thanks

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