Skip to content
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" #128

Closed
xxxserxxx opened this issue May 15, 2020 · 0 comments
Closed

Memory "leak" #128

xxxserxxx opened this issue May 15, 2020 · 0 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@xxxserxxx
Copy link
Owner

While poking around in the code, I found some old logic that appears to append to an array without end. At the time, my question was whether the user of the array -- the underlying library -- was managing the size by pruning; I now believe that it does not. Since the data being added is quite small, the effect is not noticed except over long running periods. I left gotop running in multiple VMs over the course of nearly a month, and confirmed that the memory use was substantially larger than on start up. While I don't know that the data array(s) in the widgets are the cause of this, they're a likely suspect.

This is not new; this is ineherited code. The behavior could be new since the data arrays are owned by the underlying TUI library and that could have changed; however, as far as I know this has been an issue with gotop since it started using the library.

There's a TODO in the code at the point I noticed it. This ticket is to investigate further:

  1. Dig down into the TUI library and see if it's doing any data management
  2. If not, add pruning logic
  3. If so, then start down the profiling path.
@xxxserxxx xxxserxxx added the bug Something isn't working label May 15, 2020
@xxxserxxx xxxserxxx added this to the v4.0.0 milestone May 15, 2020
@xxxserxxx xxxserxxx self-assigned this May 15, 2020
xxxserxxx added a commit that referenced this issue May 31, 2020
Fixes #128 for Sparkline. Also, the amount of data held is tiny so bumped the buffer to 4x to reduce collections.

Minor comment change
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant