Skip to content

Commit

Permalink
Fixed documentation for ProgressBar
Browse files Browse the repository at this point in the history
This place is using the old ProgressHelper API and can be confusing when migrating.
  • Loading branch information
VasekPurchart committed Jul 10, 2014
1 parent 1938c2f commit 4bc00df
Showing 1 changed file with 3 additions and 2 deletions.
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

0 comments on commit 4bc00df

Please sign in to comment.