-
-
Notifications
You must be signed in to change notification settings - Fork 150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug: Memory leak #5
Comments
First step: identify sources of memory leaks (there may be more than one!) |
After using tracemalloc and pympler to profile a few longer recordings with a lot of From tracemalloc, the top 3 largest remaining memory allocations after Ctrl + C:
It's clear that the first one is the largest by a landslide, and following the traceback I found that it came from the function that returned the screenshots, Using pympler, I printed out the newly created objects each time a key was pressed:
The Since the screenshots are put in the event queue in a loop, it seems like the most likely reason is that when a lot of input is given by the user, screenshots are put into the queue faster than they are removed from the queue, causing a pile-up of screenshots remaining in the queue. |
@KrishPatel13 @angelala3252 can you please confirm whether this fixed? |
Latest performance data:
Related: #570 |
Fixed in #628. |
There is however another memory leak that involves zombie python processes consuming lots of resources. A new Issue should be created describing this in more detail before this one is closed. |
After a while,
python puterbot/record.py
will cause the system to run out of memory.The text was updated successfully, but these errors were encountered: