Open SDX-LV opened 2 years ago
That sounds nasty. Please report if you experience this on other machines as well. If this is the case, I would suggest to kill the process if it takes to long and raise a warning to inform the user. It seems as if subprocess
can do this out of the box: https://medium.com/@chaoren/how-to-timeout-in-python-726002bf2291
On one of the 2 tested Win10 computers
manage_numcalc_script.py
is dead-slow - unusable.I traced the issue to the
_numcalc_instances()
function inmanage_numcalc.py
. Specifically on that Windows computer thefor p in psutil.process_iter(['name', 'memory_info']):
takes about 2,5 minutes to execute and fully loads one CPU core. As this command is called after each NumCalc Instance, it looks like the script is dead.The issue could be caused by antivirus or some corporate software, but the
workaround in
manage_numcalc.py
is to change line:running_instances = _numcalc_instances()
torunning_instances = 7.777 # workaround _numcalc_instances()
This will skip the extremely slow _numcalc_instances() function and fix the performance. What is lost is the possibility to limit CPU core limit (max_instances), but the max_cpu_load is still available (even if it is not very effective).
If more people are affected, please report it here and then the issue may get a permanent fix.