Pycharm freezes, slow response, high CPU usage

environment:

Windows10 22H2

pycharm 2020.1.5 Professional Edition

pytorch1.10.1

 

This is the second time I have encountered this problem. I tried to change the version of pycharm before. The problem was solved, but other bugs appeared again. After studying for a long time today, I used the method of exclusion to determine the problem.

Solutions from the web ( none of which worked for me ):

1. Change the running memory: open Help → Change Memory Settings → change the running memory to 2048MB.

2.  Clear cache: Open File → Invalidate Cache/restart in sequence.

3.  VM Options: Open Help → Edit Custom VM Options → enter the following code in turn, pay attention to not following the # sign.

-Xms128m ## PyCharm's startup memory, the bigger the better.
-Xmx2048m ## The maximum running memory of PyCharm, the bigger the better.
-XX:ReservedCodeCacheSize=512m ## PyCharm reserves the memory that the code can occupy

4. Turn off automatic update: Open File (file) → Appearance & Behavior (appearance and behavior) → System Settings (system settings) → Updates (update) → cancel the hook

5.  Exclude unnecessary files: open File (file) → Project: Administrator (project: administrator) → Project Structure (project structure), and delete all useless ones.

6. Power saving mode: Open File → Power save mode (power saving mode) in turn. This is indeed a lot faster, but there is no code check, so you can’t eat because of choking.

If none of the above works, try this again: ------------------------------------ ---------------------------

Delete the existing interpreter (interpreter), and then import it again. After the indexing is completed, everything will be normal. (The explanation is not the problem of the environment, nor the problem of pycharm, the guess is the matching problem between the two.)

Specific operation:

Open File → Settings → Project: xxx → Project: Interpreter in turn, delete the current python interpreter, and then re-import, or switch to another interpreter, and then switch back.

 

Guess you like

Origin blog.csdn.net/BeiErGeLaiDe/article/details/130393447