When atom is closed after using autocomplete, a python process launches in the background. This process is CPU intensive and doesn't end, has to be force closed. I am using the Jedi system on Windows 10.
I've been using this as a workaround:
import psutil
from time import sleep
PROCNAME = "python.exe"
for proc in psutil.process_iter():
# check whether the process name matches
if proc.name() == PROCNAME and proc.cpu_percent(interval=0.2) > 20:
cpu = proc.cpu_percent(interval=0.2)
proc.kill()
print(proc.name(), 'stopped ({}%)'.format(cpu))
break
sleep(1)
When atom is closed after using autocomplete, a python process launches in the background. This process is CPU intensive and doesn't end, has to be force closed. I am using the Jedi system on Windows 10.
I've been using this as a workaround:
import psutil
from time import sleep
PROCNAME = "python.exe"
for proc in psutil.process_iter():
# check whether the process name matches
if proc.name() == PROCNAME and proc.cpu_percent(interval=0.2) > 20:
cpu = proc.cpu_percent(interval=0.2)
proc.kill()
print(proc.name(), 'stopped ({}%)'.format(cpu))
break
sleep(1)