Skip to content
angelozerr edited this page Sep 14, 2015 · 11 revisions

Tern Performance

When you have a lot of JS files in your project, you can have performance problem with tern like Regular freeze of UI . If you use bower, npm, etc tooling, you can download a lot of JS files in your project (and perhaps you need not).

So here rules that you wish to respect :

  • don't parse JS files for libraries like jquery, angular, express, etc, if you have a tern plugin which support the JS framework.
  • don't parse the whole JS files of your project. Parse only JS files that you need.

In tern.java, parsing JS files is done the first time (when tern server is started) when tern completion, hyperlink, validation, hover is done. To know which JS files must be parsed by tern, tern.java uses tern script path that you must configure.

tern script path can be configured :

  • at hand
  • automatically by using JSDT Install Path.

tern script path must be improved :

  • disable/enable JSDT Install path -> Tern script path. Indeed with JSDT Install path you could parse the whole JS files of your project.

  • support exclude folder tern script path.

  • Improve JSDT Install Path -> Tern script path https://github.com/angelozerr/tern.java/issues/168

  • idea to improve performance: use tern condense to analyze the first time a lot of js files and generate the result of the analyze with tern condense in file system. The second starts of tern server will use those result of analyze coming from file system

Clone this wiki locally