[Lazarus] ProgressBar 0 vs. 6 Gauge

Bart bartjunk64 at gmail.com
Sat Jul 28 13:31:21 CEST 2012


On 7/28/12, silvioprog <silvioprog at gmail.com> wrote:

> Please see two demos in attached. It's a comparison of performance
> between two famous components of the Delphi. My conclusion is that the
> progressbar is stupidly slow.
>
> In a loop with 20.00.000 steps:
>
> ProgressBar: 33 secounds.
>
> Gauge: 0,1 secounds.

Why would speed be an issue with a progressbar (unless it is as slow
as turtle crawling up a slope).
Normally one would display a progressbar during operations that take a
long time by nature, to inform the user that progress is still going
on.
If the operation takes less time then drawing the progressbar, a
progressbar shouldn't be needed.

E.g. im my backup program I display a progressbar during the copying
of individual files.
If a file is smaller than e certain threshold I simply omit displaying
the progressbar, since it is effectively of no use then.

Bart




More information about the Lazarus mailing list