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

Remove unnecessary ProgressBar stdout writes (fixes flickering) #30278

Merged
merged 1 commit into from Feb 17, 2019

Conversation

Projects
None yet
4 participants
@ostrolucky
Copy link
Contributor

ostrolucky commented Feb 17, 2019

Q A
Branch? 3.4
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets
License MIT
Doc PR

Currently ProgressBar flickers when writing a lot.

ezgif-4-ad817e1834

This patch fixes it and it's buttery smooth now.

Additionally, this improves performance by 60%. Test code

$maxSteps = 1000000;
$progressBar = new ProgressBar(new ConsoleOutput(), $maxSteps);
for ($i=0; $i<= $maxSteps; $i++) {
    $progressBar->advance();
}

@ostrolucky ostrolucky force-pushed the ostrolucky:progressbar-flickering branch from 94aa211 to 3fbcb96 Feb 17, 2019

@chalasr chalasr added this to the 3.4 milestone Feb 17, 2019

@chalasr chalasr added the Console label Feb 17, 2019

@chalasr
Copy link
Member

chalasr left a comment

Great :)

@fabpot

fabpot approved these changes Feb 17, 2019

@fabpot

This comment has been minimized.

Copy link
Member

fabpot commented Feb 17, 2019

Thank you @ostrolucky.

@fabpot fabpot merged commit 3fbcb96 into symfony:3.4 Feb 17, 2019

2 of 3 checks passed

continuous-integration/travis-ci/pr The Travis CI build failed
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
fabbot.io Your code looks good.
Details

fabpot added a commit that referenced this pull request Feb 17, 2019

bug #30278 Remove unnecessary ProgressBar stdout writes (fixes flicke…
…ring) (ostrolucky)

This PR was merged into the 3.4 branch.

Discussion
----------

Remove unnecessary ProgressBar stdout writes (fixes flickering)

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        |

Currently ProgressBar flickers when writing a lot.

![ezgif-4-ad817e1834](https://user-images.githubusercontent.com/496233/38173299-44482400-35bc-11e8-88b6-83b480d55905.gif)

This patch fixes it and it's buttery smooth now.

Additionally, this improves performance by 60%. Test code
```php
$maxSteps = 1000000;
$progressBar = new ProgressBar(new ConsoleOutput(), $maxSteps);
for ($i=0; $i<= $maxSteps; $i++) {
    $progressBar->advance();
}
```

Commits
-------

3fbcb96 Remove unnecessary ProgressBar stdout writes (fixes flickering)

This was referenced Mar 3, 2019

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