WebStorm Freezes on indexing
Im using a licenced webstorm 2017.2 windows 7. I just cloned an existing git repository and opened the app folder in WebStorm. It starts indexing, and never finishes. Whenever WebStorm loses focus (when I switch to any other program) it freezes completely. I upgraded to 2017.2 and tried to pause the indexing. To no avail.
When I open any other project folder, the indexing does not fail. It seems to fail on random node_modules folders
Anyone any idea?
Please sign in to leave a comment.
note: WebStorm does not give me the option to mark node_modules as "excluded", nor the folders within node_modules of which some or still included and being indexed even though i don't want them to..
I think I fixed it by doing the following; by default, node_modules was "excluded" however, opening the node_modules folder showed dozens of libs being indexed.
1. right click node_modules -> mark direcoty as -> cancel exclusion
2. right click node_modules -> mark direcoty as -> exlude
now all subfolders are being excluded
By default, node_modules folder is excluded, but modules explicitly listed in package.json are added to JavaScript libraries for completion and thus are still indexed
Thanks Elena, that clarifies a lot. But still there is a bug preventing WebStorm to properly index them...
I wonder similar thing Elena. Is there a way to disable package.json indexing? WebStorm freezes when I switch windows and becomes unusable :-(
See https://intellij-support.jetbrains.com/hc/en-us/community/posts/115000454484/comments/115000379204 for a workaround.
Also, please try disabling 'Synchronize files on frame activation' (Settings | Appearance & Behavior| System settings) - does it help?
And i'd strongly recommend excluding all folders dynamically generated by build tools (
www
,dist
, etc) from your project (Mark directory as/Excluded). This would reduce the overall code base size and help to avoid project re-indexing while flashing generated files to diskElena, yes, I've already tried that include/exclude of npm_modules folder. It made things a little better. Now I get IDE freeze 1 time out of 3-4 window switches. Also, that IDE freeze started happening once I've upgraded to 2017.2, before that it was perfectly fine. Is there anything specific to that update that I could turn off in order to help with that freeze issue?
No, there is nothing special. Did you try excluding build folders per my advise?
If this doesn't help, please try taking CPU snapshots once the problem occurs (https://intellij-support.jetbrains.com/hc/en-us/articles/207241235-Reporting-performance-problems)
Alex, when you double click the indexing loading bar it opens a popup where it actually shows the folder it's currently indexing. It will most likely be a 3rd party lib. Which could/should be excluded
Elena, RobinR, yes I have most of my folders excluded with the exception of actual source code. I just went through all excluded folders (not just node_modules) and did include/exclude action. Maybe WebStorm's index got confused somehow, I don't know.. well, we will see if it helps. Also, I'll keep an eye on that indexing status popup if it freezes again.
Elena, according to the article you referred me to IDE does automatic thread dumps when it detects freezes. I went to check the log folder and there are indeed dumps for the times IDE froze on me:
Is there anything I should be looking at in those dumps, so I can understand what the problem is?
No; you can attach these dumps here, but CPU snapshots would be more helpful
Elena, I've just uploaded the snapshot using uploads.services.jetbrains.com service, the filename is WS-172.3317.70_alex.marinenko_20.07.2017_10.41.53.zip. The problem is sporadic and it's really hard to catch it but I hope that CPU snapshot can help find the issue.
Can you recreate the issue when the Favorites view is closed? How big is the file being edited?
Also, please provide the content of your log folder (idea.log and auto-generated thread dumps)
Elena, I've uploaded idea.log and several thread dumps from that period, please check it - WS-172.3317.70_alex.marinenko_idea_log_and_thread_dumps.zip.
On the Favorites view, is the following considered closed?
I have it always collapsed unless I need to navigate to a file from Favorites list then I open it and close back again.
On the file size, nothing crazy there.. just a regular size files (~1000 lines top).
Unfortunately neither dumps, nor the log gave me any clue - no freezing, a single exception that doesn't look related:(
On your picture, the view seems to be closed; snapshot shows that it's open
Elena, OK, I'll remove all the items from the Favorites list and check if it improves things.
Elena, after I removed all the items from the Favorites list the IDE seems to be working fine. It's not critical to me not to have that list handy anymore it was just a nice addition and it worked fine in 2017.1. Thank you for your help!