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

Improve performance in ConsoleProgressBarConsumer.accept #106

Merged
merged 1 commit into from
Jul 7, 2021

Conversation

heroesleo65
Copy link
Contributor

StringDisplayUtils.trimDisplayLength(str, max_display_len) to select string with minimal of total display length this str and given max_display_len. I mean that calculate display length of string is unnecessary. This idea is using in InteractiveConsoleProgressBarConsumer (

String s = StringDisplayUtils.trimDisplayLength(str, getMaxRenderedLength());
)

@ctongfei
Copy link
Owner

ctongfei commented Jul 7, 2021

Yeah you are right. The code is completely redundant. Thanks!

@ctongfei ctongfei changed the base branch from main to 0.9.3 July 7, 2021 05:01
@ctongfei ctongfei merged commit a9c99a0 into ctongfei:0.9.3 Jul 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants