Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Prevent ProgressBar redraw when message is same #33884

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

Merged
merged 1 commit into from
Oct 7, 2019

Conversation

fmasa
Copy link
Contributor

@fmasa fmasa commented Oct 7, 2019

Q A
Branch? 4.4
Bug fix? no
New feature? no
Deprecations? no
Tickets
License MIT
Doc PR

This PR prevents ProgressBar from performing unnecessary redrawes if new output is same as current one. This is mostly useful when working with multiple progress bars. Same behavior can enforced by carefully setting redraw frequency, but I don't see any downsides for smarter redrawing by default.

This can be moved to if ($this->overwrite) if necessary, so it's applied only in case overwriting is enabled.

@nicolas-grekas
Copy link
Member

Thank you. The PR should target 4.4 as it's more an improvement than a bug fix.

@fmasa fmasa changed the base branch from 3.4 to 4.4 October 7, 2019 12:16
@fmasa fmasa force-pushed the feat/prevent-pb-redraw branch 2 times, most recently from 0142216 to 40210a5 Compare October 7, 2019 12:27
@fmasa
Copy link
Contributor Author

fmasa commented Oct 7, 2019

@nicolas-grekas Done. I wasn't really sure whether to consider it bugfix or improvement.

@chalasr chalasr force-pushed the feat/prevent-pb-redraw branch from 992aaab to 78b515f Compare October 7, 2019 16:46
@chalasr
Copy link
Member

chalasr commented Oct 7, 2019

Thank you @fmasa.

@chalasr chalasr closed this in e3b513b Oct 7, 2019
@chalasr chalasr merged commit 78b515f into symfony:4.4 Oct 7, 2019
@fmasa
Copy link
Contributor Author

fmasa commented Oct 7, 2019

Thank you both for quick feedback.

@nicolas-grekas nicolas-grekas modified the milestones: next, 4.4 Oct 27, 2019
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.

4 participants