Fix 1 — biggest impact
Add Windows Defender exclusions
# Exclude PyCharm index and cache folders:
PS> Add-MpPreference -ExclusionPath "$env:APPDATA\JetBrains"
PS> Add-MpPreference -ExclusionPath "$env:LOCALAPPDATA\JetBrains"
# Also exclude your project folders:
PS> Add-MpPreference -ExclusionPath "C:\path\to\your\projects"
Defender exclusions are the single biggest performance improvement for PyCharm on Windows. Indexing can be 3–5x faster after adding them.
Fix 2
Increase PyCharm heap memory
Help → Change Memory Settings. Increase the heap size to at least 2048 MB (2 GB) if you have 8 GB+ RAM. Click Save and Restart.
Or edit directly: Help → Edit Custom VM Options → change -Xmx value:
# Change from default 750m to 2048m:
-Xmx2048m
Other optimisations
More ways to speed up PyCharm on Windows
- Use an SSD — PyCharm is very I/O heavy during indexing. An SSD makes a huge difference.
- Disable unused plugins — Settings → Plugins → disable plugins you do not use
- Power plan — Windows power plan to High Performance: Settings → Power → High performance
- Reduce index scope — mark large folders (node_modules, .venv) as Excluded: right-click folder → Mark Directory as → Excluded
FAQ
Performance questions
Why is PyCharm so slow on Windows?
The main causes: (1) Windows Defender scanning PyCharm index files in real time, (2) insufficient heap memory causing frequent garbage collection, (3) project on a slow HDD. Add Defender exclusions and increase heap to 2 GB for the most impact.
PyCharm indexing is very slow — how to speed it up?
Add the JetBrains AppData folders to Defender exclusions (see above). Also mark large folders as Excluded in PyCharm (node_modules, .venv, build directories). Exclude them prevents PyCharm from indexing them at all.