32
votes

I really dig the idea of Pycharm and would love to use it. However, its tendency to consume the computer's processing power and lag is a large drawback.

In the near future, I'll be running an introductory Python course and would like to recommend that the students install Pycharm as it seems to be the friendliest IDE out there.

Is there a way to speed up Pycharm to make its processing a bit 'lighter'? Or is there an alternative IDE with similar features that people would recommend?

4

4 Answers

24
votes

The slow performance of PyCharm is mainly due to small amount of RAM. I am running PyCharm on a machine with 2GB RAM. Here are my recommendations on making it work smoother.

  1. You can't really tweak PyCharm for performance balancing the power it provides. If you turn off the inspection or works on Power Saver Mode, You won't get code completion unless you manually invoke it with Ctrl + Space.

  2. Switch to a lighter Operating System. (If you are a Linux person you have a plenty of choices.)

  3. Monitor other System processes. (I was able to bring down standby memory usage of Kubuntu to less than 300MB by disabling other 'useless' processes that eat up memory)

  4. Disable unused plugins in PyCharm.

  5. Modern browsers are memory hungry. Limit number of tabs and plugins (even Adblock consumes around 70MB RAM) if you open docs on brower while you code.

  6. Update your hardware. (This really helps. Invest on RAM so you can ignore the points above)

WingIDE is an another IDE that works somewhat similar to PyCharm.

10
votes

PyCharm is written in Java, and Java uses Just In Time compiling i.e. a method in Java bytecode is converted to native code the first time that method is called. The next time that method is called it runs much faster.

So, the first thing you should do with a new installation of PyCharm is run it a few times and try some of the basic features. Be sure to open and close PyCharm a few times as well. I find that this helps everytime I install a new version of PyCharm.

7
votes

First of all: you can disable inspections.

In right bottom, on status bar, next to memory usage indicator, there is a little Hector head - click it and select "syntax" level. I belive this will help a lot.

If this won't help enough you can set "Power save mode". From PyCharm help:

When Power Save Mode is on, PyCharm reduces its functionality to the one of a text editor, by not executing expensive background activities that drain laptop battery.

By @user4437749 below, biggest gain I have seen was from disabling the Incorrect Call Arguments inspection

4
votes

In the hardware end, upgrading your system is a fair choice. PyCharm recommends 1 GB of RAM as stated in the system requirements at the PyCharm website.

You could disable a few of PyCharm's functionalities like disabling inspections. You could also turn on "Power Save Mode" for PyCharm.

You could also use a lighter operating system when running PyCharm, or kill a few processes to reduce the load of the computer.

If PyCharm is still heavy for you, you could try out Python for VS Code, KDevelop, or you could go use a text editor such as Atom for Python development. Here's a full list of Python IDEs.