So I think I am looking at a bug. I have noticed a few times that using find in path can really slow down WebStorm, but I think I just found a simple way to reproduce it. In particular I now can easily create an out of memory with a simple search on the DOJO toolkit. Here are the steps and result:
- Start WebStorm and create a blank project
- Add dojo-release-1.5.0 to the project (add as sub-directory)
- After indexing WebStorm is still only using about 44MB
- Now doing a search in path (whole project) for "Deferred".
- WebStorm will quickly zoom to the max memory amount, then spike the CPU for a few minutes (I assume the JVM is desperately trying to GC to stay within its Xmx limit), then finally shows the Out of Memory dialog (attached).
I can obviously raise the Xmx amount (and have a bit), but I think a 500MB+ spike to do string search seems a bit excessive, no?
Assuming its a bug I am happy to put it in issue tracker, just want to make sure I am not doing something wrong first.