Performance issue when using Bower to manage Javascript files

Hi, I am a long time user of Intellij and generally find performance good on my laptop (Core i7, 8Gb RAM, SSD). Am running 13.1.3.

Recently I've started using Bower to manage Javascript dependencies in my Java webapp. For these projects, IDEA seems to struggle. I get very high CPU activity when the webapp is running and I'm switching windows (frame deactivation). This happens even when there are no changes to the bower-managed javascript files. Also, the bower files are not in the webapp itself -- I have /bower_components and /node_modules at the root of the project. I run a grunt task to copy selected js files from there directly into the target folder.

I've excluded bower_components and node_modules from the project, so they don't appear in the Project window. This doesn't seem to help.

I have "On frame deactivation" set to "Update resources", which is how I like to work.

Any suggestions what else I can do to improve performance for these projects? I am not that interested in indexing these Javascript files as I tend to use them minified anyway.

Thanks, Alfie.

4 comments
Comment actions Permalink

Hi,

Where do you set "On frame deactivation" to "Update resources" in UI? AFAIK, the only available action on frame deactivation is “Save files on frame deactivation” checkbox in "Settings | General". Saving files may trigger grunt watch task that will copy files to the target folder.

Possibly related issue: http://youtrack.jetbrains.com/issue/WEB-12204

Suggestions:
1. If possible, exclude the target folder that the grunt task copies js files to.
2. Try to launch IDEA 13.1.3 with -Didea.schedule.cache.update.in.dumb.mode=true
3. Try IntelliJ IDEA 14 EAP http://confluence.jetbrains.com/display/IDEADEV/IDEA+14+EAP. It contains some performance bug fixes.
4. If nothing helps, please capture a CPU snapshot using instructions from https://intellij-support.jetbrains.com/entries/29983118-Reporting-performance-problems and attach it here.

Thanks,
Sergey

0
Comment actions Permalink

Hi Sergey, thanks for the reply. I am setting "Update resources" in the Run Configuration for Tomcat, not in the global settings.

I'm not running grunt watch so that isn't a factor. Grunt copies into the main 'target' folder (under webapp name) which is already excluded AFAIK.

I will try your other suggestions and report back.

Regards, Alfie.

0
Comment actions Permalink

Hi, I'm returning to this issue... excluding bower_components fixed the performance problem but of course then I lost indexing of these files and now this is starting to hurt.

I'm running 14.1 now and still find issues when I don't exclude bower_components. It is unrelated to updating webapp resources (run configuration) as I'm not using that option on my current project.

It seems to work ok for a while, but then switching editor views and particularly working in the HTML editor becomes sluggish.

I would like to capture some profiling but following the instructions on the link provided didn't work for me - I don't get any new options in the Tools menu.

Any help much appreciated.
Alfie.

0
Comment actions Permalink

Hi Alfie,

To capture CPU profiling you need to enable Profiler Agent by modifying .vmoptions file (see "Enabling Profiler Agent" section from https://intellij-support.jetbrains.com/entries/29983118-Reporting-performance-problems). What .vmoptions file have you modified? Please attach also your idea.log (on the main menu "Help | Show Log in ...").

It seems to work ok for a while, but then switching editor views and particularly working in the HTML editor becomes sluggish.

Could you please provide more details about editor views you are switching? Is IDE hanging because of background indexing when working in the HTML or something else?

Are there any automatic thread dumps by chance? (See "Automatic thread dumps" section from https://intellij-support.jetbrains.com/entries/23348667).

Thanks, Sergey

0

Please sign in to leave a comment.