Skip to content

[Console] Fixed documentation for ProgressBar #4010

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
Jul 25, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions components/console/helpers/progressbar.rst
Original file line number Diff line number Diff line change
Expand Up @@ -265,10 +265,11 @@ to display it can be customized::
For performance reasons, be careful if you set the total number of steps
to a high number. For example, if you're iterating over a large number of
items, consider setting the redraw frequency to a higher value by calling
:method:`Symfony\\Component\\Console\\Helper\\ProgressHelper::setRedrawFrequency`,
:method:`Symfony\\Component\\Console\\Helper\\ProgressBar::setRedrawFrequency`,
so it updates on only some iterations::

$progress->start($output, 50000);
$progress = new ProgressBar($output, 50000);
$progress->start();

// update every 100 iterations
$progress->setRedrawFrequency(100);
Expand Down