Performance fix

Fix PyCharm slow on Windows — speed up indexing & performance

PyCharm is slow on Windows mainly because of Windows Defender scanning PyCharm index files and insufficient heap memory. Adding exclusions and increasing JVM heap size typically cuts indexing time by 50–70%.

Add Windows Defender exclusions

PowerShell โ€” Administrator
# 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.

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:

pycharm64.vmoptions
# Change from default 750m to 2048m:
-Xmx2048m

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

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.

PyCharm not opening?

Fix startup and crash issues.

Not opening fix