-
Notifications
You must be signed in to change notification settings - Fork 76
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
Memory leak by design in the console and log #110
Comments
The logger is actually restricted to a maximum of 1000 blocks. @RenWal Can you give us such a large script you use? |
I've just added the maximum block count for the python console as well. @RenWal Does it have an impact for you? |
I can still see some memory consumption but the rate has decreased a lot. This is my test case: Note that in this case, the console reaches the block limit but the log does not: Line breaks in print statements are stripped from the log, so only 100 lines (1 for each execution) exist. This would explain the 2.4MiB memory consumption. This is probably also what made me think that both log and console were leaking, as I was printing large amounts of data with line breaks from a single print statement, thus the log's block limit was never hit. |
@Slowpoke42 could you take a look on this? |
Describe the bug
Both the Python console and the log have infinite scrollback. This causes high memory consumption of a few tens to hundreds additional MB when you leave HAL running for a long time (I like to have the tool in a VM and just hibernate that VM, i.e. HAL is never closed) or you print an insanely large amount of data from your Python script.
To Reproduce
top
and see the memory usage of the hal processExpected behavior
HAL should only keep the last few hundred lines of console and log loaded and visible. Older data should be removed from the widgets to save memory.
If you really, really want an infinite scrollback buffer you could put it on a disk and load it on demand / map it into memory.
The text was updated successfully, but these errors were encountered: