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

Prevent ProgressBar redraw when message is same #33884

Merged
merged 1 commit into from Oct 7, 2019

Conversation

@fmasa
Copy link
Contributor

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.

@fmasa fmasa force-pushed the fmasa:feat/prevent-pb-redraw branch from b44b9c6 to dbf9b4d Oct 7, 2019
@nicolas-grekas nicolas-grekas added this to the next milestone Oct 7, 2019
@nicolas-grekas

This comment has been minimized.

Copy link
Member

commented Oct 7, 2019

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 Oct 7, 2019
@fmasa fmasa force-pushed the fmasa:feat/prevent-pb-redraw branch 2 times, most recently from 0142216 to 40210a5 Oct 7, 2019
@fmasa

This comment has been minimized.

Copy link
Contributor Author

commented Oct 7, 2019

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

@chalasr chalasr added Console and removed Bug labels Oct 7, 2019
@chalasr
chalasr approved these changes Oct 7, 2019
@chalasr chalasr force-pushed the fmasa:feat/prevent-pb-redraw branch from 992aaab to 78b515f Oct 7, 2019
@chalasr

This comment has been minimized.

Copy link
Member

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
1 of 3 checks passed
1 of 3 checks passed
continuous-integration/appveyor/pr Waiting for AppVeyor build to complete
Details
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
fabbot.io Your code looks good.
Details
@fmasa

This comment has been minimized.

Copy link
Contributor Author

commented Oct 7, 2019

Thank you both for quick feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.