PyCharm works well and very smoothly for the most part on my i7-8550U, 16GB, 1TB SSD Ubuntu notebook. This issue is filesize dependent, and I have no idea what's causing it (I don't use any extra plugins, everything is stock as setup when installing PyCharm except for some basic visual theme changes).
On my project, I can open a .py file that's say only 50 lines. If i have:
test = 'Hello World'
and replace the 'test' in the print command with 'testt' (or any other incorrect value), it gets underlined instantly as an unresolved reference. Removing the extra character instantly fixes the inspection, no lag, no high CPU usage.
On another python file, opened in the exact same project, I have a 1200 line JSON dictionary indexing a dataset message received from an external source and titling each entry with a name. another ~300 lines for overhead, but nothing heavy there. Basic example below:
Simple stuff. Albeit large for a JSON dict, nothing to cry about I'd think. Thing is, if I change anything, like a single ext_source to external_source (creating an unresolved reference), it takes about 5 seconds for PyCharm to notice the inspection issue and underline it in red, and if I fix it, it takes about 10-25 seconds before it finally notices the variable name is correct again. CPU usage and heat is never an issue otherwise, but when editing this simple 1500 line file it starts to run heavily and heat up my notebook a lot. Especially when typing new info into the file.
Doing the above 'test' --> 'testt' example is also just as slow. If I comment out the 1200 line JSON dict, the file is immediately faster, more responsive, and has no issues with any highlighting, nor is the CPU running high.
Memory indicator has a max heap size of 1902MB, Allocated 682MB, usage between 150-350MB throughout process.
Disabling inspections or going into power saving mode fixes most of the issues, but I really do like the inspections and find them useful. I removed half of the inspection types that I don't use in case that would affect the speed, but no change. Disabling language injections also did nothing. What's the deal? Why can't stock PyCharm handled simple syntax and variable name (among all other types) inspections when the file is of a medium size? The slowness is annoying but not the end of the world, but the CPU usage boosts randomly and heats up more than what is reasonable, which caused me to start exploring for a solution.
Thanks in advance!