Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2012-07

ProgressBar 0 vs. 6 Gauge

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

silvioprog

Hi,

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.

Was this difference almost led me to "hack" the native Gauge of Delphi. ^^

Thx.

Silvio Cl?cio My public projects - github.com/silvioprog -------------- next part -------------- A non-text attachment was scrubbed... Name: t.zip Type: application/zip Size: 2962 bytes Desc: not available URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20120727/d62d4a37/attachment.zip>

Reply by email

Bart
to silvioprog
silvioprog wrote 9 lines
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

Reply by email