I searched it over the Internet, but did not find anything related to it.
I have two large python dictionaries that contain more than two million key pairs. My computer constantly shows 100% usage when I do any calculations on this data.
In this regard, I can not perform another task in my system, because it hangs often.
Is there a way to limit the maximum CPU allocation for a python program by writing code in the python program itself. Since I do not want this program to use 100% processor time.
PS: I am currently using the sleep function to limit it, but it looks stupid. I am using windows 7.
user2374515
source share