PyCharm 4.0.5 hangs on 'scanning files to inde

2019-03-09 17:05发布

my spec: Intel Core i5-3470 3,2 GHz / 4 GB Ram / I'm using Windows 64 bit. PyCharm 4.0.5

When I launch PyCharm it starts 'scanning files to index' background task and hangs for ~1 hour/forever. From time to time it finishes and proceeds with Updating indices task. It lasts for ~ 3 hours/forever. While this processes are running it is very hard to use PyCharm and even some other programs. PyCharm starts from ~ 200 mb and tooks ~ 1GB of memory at the end of this tasks.

On my laptop, which is much worse. PyCharm launches in 30 sec and ready to work. I'm working on same project on my PC/Laptop

Please, advise.

P.S I don't have simlinks to exclude in my Project Structure

http://prntscr.com/6g6ovq

6条回答
欢心
2楼-- · 2019-03-09 17:43

I just tried the following:

In PyCharm, go to the "File" on the left top, then select "invalidate caches/restart...", and press "Invalidate and restart".

After that, it can finish scanning in a short period without hanging anymore.

查看更多
Explosion°爆炸
3楼-- · 2019-03-09 17:46

My project contained a folder that had like 100k files/folders inside. This was making indexing way too slow.

To fix this, exclude the folder from Project structure in PyCharm.

File - Settings - Project: yourprojectname - Project Structure - Right click on folder and press "Excluded"
查看更多
劫难
4楼-- · 2019-03-09 17:46

Deleting and reinstalling Pycharm 4.0.5 fixed this for me.

查看更多
狗以群分
5楼-- · 2019-03-09 17:48

Late answer but this may help other people in the future. For me this issue was fixed by raising the inotify watches limit. After raising it as described on jetbrains their website (https://confluence.jetbrains.com/display/IDEADEV/Inotify+Watches+Limit) it worked properly.

  1. Add the following line to either /etc/sysctl.conf file or a new *.conf file (e.g. idea.conf) under /etc/sysctl.d/ directory:

fs.inotify.max_user_watches = 524288

  1. Then run this command to apply the change:

sudo sysctl -p --system

查看更多
ゆ 、 Hurt°
6楼-- · 2019-03-09 17:54

I ended up going to the .idea folder of the project and deleting it in order to keep it from hanging when it starts. Then made any appropriate changes to keep it from indexing unnecessary files.

查看更多
神经病院院长
7楼-- · 2019-03-09 17:59

I've already answered this question on Stackoverflow, so I'll just copy and paste... I had the same problem and "File | Invalidate Caches/Restart" had not helped because Pycharm didn't respond at all. I found ".Pycharm50" directory in my home directory -- it contains configuration files. After its removal Pycharm launched as if you've just downloaded it, everything still goes well.

查看更多
登录 后发表回答