Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PyCharm hangs on 'scanning files to index' background task

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 these processes are running it is very hard to use PyCharm and even some other programs. PyCharm starts from ~200MB and took ~1GB of memory at the end of these tasks.

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

I'm using Windows 64 bit. PyCharm 4.0.5

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

enter image description here

like image 379
Hacking Node Avatar asked Mar 13 '15 11:03

Hacking Node


People also ask

How do I stop PyCharm scanning to index?

You can do this by right-clicking the folder you want to exclude, then choose Mark Directory As > Excluded and PyCharm will not index those files.

What does it mean when PyCharm is indexing?

Indexing examines the code of your project to create a virtual map of classes, methods, objects, and other code elements that make up your application. This is necessary to provide the coding assistance functionality, search, and navigation instantaneously. After indexing, the IDE is aware of your code.


1 Answers

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" 
like image 141
Jaanus Avatar answered Sep 18 '22 17:09

Jaanus