in reply to Re^2: Using a progress bar... having issues
in thread Using a progress bar... having issues

For anything taking less than about a second a progress bar is, as you have amply demonstrated, a complete waste of time. As a general thing aim for a progress bar update about every 1/10th of a second. That means having some idea of how long each iteration of your process takes an perform a progress bar update every 1 / (10 * iteration seconds) iterations.

Premature optimization is the root of all job security
  • Comment on Re^3: Using a progress bar... having issues

Replies are listed 'Best First'.
Re^4: Using a progress bar... having issues
by james28909 (Deacon) on Aug 09, 2015 at 05:09 UTC
    Yes, I know it is a complete waste of time haha. I didnt want to hijack the thread and just wanted to ask about it. If it were a larger file that took a while to process, then it would have a significant difference. I was just wondering if it was because the calculations for the percentage, or printing the actual progress bar, or a combination of both? But it was the size of the buffer that was slowing it down tremendously. Now it transitions alot quicker, especially with larger files. This was the first time i ever attempted using a progress bar as well. Im not a professional by far and never claim to be. Im just an enthusiast programmer and like tinkering. And thanks for the wisdom as well. I will keep that in mind next time i /must/ have a progress bar.

    Cheers :)