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

Implements a buffer limit for the Text widget. #301

Merged
merged 12 commits into from Apr 3, 2021
Merged

Implements a buffer limit for the Text widget. #301

merged 12 commits into from Apr 3, 2021

Conversation

mum4k
Copy link
Owner

@mum4k mum4k commented Apr 3, 2021

See issue #293 where memory and performance can degrade with a high number of lines written to the Text widget.

This is a very simplistic implementation to limit the possible length the text buffer can grow to with the maxContent option.

Default value of -1 means there's no limit and therefore behaviour should remain standard.

It has been working in our test app and allows the use of the Text widget to monitor logs (ie tail) and therefore doesn't bloat over time, but happy to adjust as required.

timbutler and others added 2 commits April 3, 2021 12:42
See issue #293 where memory and performance can degrade with a high number of lines written to the Text widget. 

This is a very simplistic implementation to limit the possible length the text buffer can grow to with the `maxContent` option. 

Default value of -1 means there's no limit and therefore behaviour should remain standard.

It has been working in our test app and allows the use of the Text widget to monitor logs (ie tail) and therefore doesn't bloat over time, but happy to adjust as required.
@coveralls
Copy link

Pull Request Test Coverage Report for Build 2223

  • 10 of 18 (55.56%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.07%) to 91.21%

Changes Missing Coverage Covered Lines Changed/Added Lines %
widgets/text/text.go 5 13 38.46%
Totals Coverage Status
Change from base Build 2221: -0.07%
Covered Lines: 8395
Relevant Lines: 9204

💛 - Coveralls

@coveralls
Copy link

coveralls commented Apr 3, 2021

Pull Request Test Coverage Report for Build 2243

  • 60 of 62 (96.77%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.03%) to 91.313%

Changes Missing Coverage Covered Lines Changed/Added Lines %
widgets/text/options.go 6 8 75.0%
Totals Coverage Status
Change from base Build 2221: 0.03%
Covered Lines: 8441
Relevant Lines: 9244

💛 - Coveralls

@mum4k mum4k merged commit 4238ac6 into devel Apr 3, 2021
@mum4k mum4k deleted the bufferlimit branch April 3, 2021 21:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants