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

Possible memory bloat because of process runner output buffer #30

Closed
steezeburger opened this issue Apr 3, 2024 · 3 comments · Fixed by #48
Closed

Possible memory bloat because of process runner output buffer #30

steezeburger opened this issue Apr 3, 2024 · 3 comments · Fixed by #48
Assignees

Comments

@steezeburger
Copy link
Member

steezeburger commented Apr 3, 2024

Clear the buffer sometimes or use a circular buffer or something probably

@steezeburger steezeburger changed the title Possible memory bloat because of process runner buffer Possible memory bloat because of process runner output buffer Apr 3, 2024
@steezeburger steezeburger self-assigned this Apr 3, 2024
@steezeburger
Copy link
Member Author

Might be able to clear safebuffer after every write, similar to how tview's AnsiWriter works.

This along with the feature that writes logs to disk should be sufficient for a good dx with no memory bloat.

@steezeburger
Copy link
Member Author

  • so the TextView has a buffer that only gets cleared if max lines is set,
  • AnsiWriter has a buffer that gets cleared every time it writes
  • SafeBuffer has a buffer that never gets cleared
    i think we could clear SafeBuffer after every write though, since we're keeping all the text in the TextView buffer at the moment

@steezeburger
Copy link
Member Author

may not need it, but linking for notes: https://github.com/smallnest/ringbuffer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant