How to make Pycharm faster/lighter?

一曲冷凌霜 提交于 2019-12-21 03:26:32

问题


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?


回答1:


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.




回答2:


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.




回答3:


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.




回答4:


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.



来源:https://stackoverflow.com/questions/38242978/how-to-make-pycharm-faster-lighter

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!