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

Tern Performance

When you have a lot of JavaScript 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 JavaScript files in your project (and perhaps you need not).

To have a good performance, here rules that you must follow :

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

In tern.java, the parse of the JavaScript files is done the first time (when tern server is started) when tern completion, hyperlink, validation, hover is done. To know which JavaScript 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.

Which version of tern.java?

To avoid having freeze of Eclipse, you must install tern.java >= 1.0.0 which provides the capability to exclude path.

Improvement ideas

  • 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