'IntelliJ IDEA takes too long to show files in the "file/folder selector" dialog

Update (24/01/16):

I'm not sure why, but it doesn't happen anymore, I forgot what I've changed the last time I was using this PC, I remember disabling Google Drive from opening at startup, but not sure that's the reason, the moment I'll figure it out I'll post an update here.

Also, since I found no other people having this problem on the Internet, I guess it's a good idea to post solutions in case someone had this problem and solved it for the next user who'll face this problem.


Problem description:

Whenever I get to the dialog where I open a file or directory (Like "File>Open..." or "import settings") it takes about 50 seconds to show the file tree. There's nothing shown except "Loading..." and "Nothing to show".

Also, clicking the "X" button or the "Cancel" button does not respond until it finishes with the process of showing the file tree. The same can be said about dragging a file/folder, it just won't respond until it finishes the slow initialization.

The dialog window itself is responsive all the time, it's not frozen.

Seems like it takes a long time to initialize, and after that it works perfectly (Until the next time I get to this dialog).

Technical details:

  • I'm using Windows 10 Pro 64bit
  • The OS and the software are installed on an SSD
  • The directories I'm browsing are on the same SSD
  • The project is an Android project

Things I've tried:

  • Disabling windows indexing
  • Running the 64bit version of IntelliJ IDEA
  • Running it as administrator
  • Invalidating catches and restarting
  • Turning off the antivirus (NOD32)


Solution 1:[1]

Same for me, but I found the culprit in my case. I have some network drives mapped with drive letters assigned to them, and if those network drives are disconnected but Windows 10 does not notice this and shows them as being connected the "Select path" dialog takes a long time to show the file tree. So the solution is to set those de facto disconnected network drives to appear "disconnected" in Windows Explorer. To be more specific, in my case those network drives are mapped in a virtual machine running under VirtualBox; quitting the virtual machine did not make them disconnected for the W10 host.

Solution 2:[2]

I know this is not a proper fix, but you can just drag folders onto the IntelliJ desktop icon and it'll open them instantly.

Solution 3:[3]

  • Disable all the plugins that you are not using
  • Go to Android Studio folder in the bin folder there is a file named studio64.vmoptions open it and make this change: -XX:MaxPermSize=1024m at least (if it is 350m), -Xms128m and -Xmx2048m

I hope this will help you :/

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Mihai Cazac
Solution 2 fxtentacle
Solution 3 Tano