my application needs to display progress, however reading the file twice is where the first pass counts the total is not an option due to performance reason. What’s a reasonable estimate for the total? should I estimate based on file size?
my application needs to display progress, however reading the file twice is where the
Share
Yes, base it on file size. If you know the total size and the amount of bytes processed, you can make an estimate of the remaining time. That is, if this processing is some lineair process.
If it isn’t and some portions of the file take much much longer to read and process, it is hard to make a good estimate. In that case, it is better to show some waiting cursor, or (if it takes long) let the user play a little game to kill the time. 🙂
Like you said, it is never a good idea to run a process once, just to be able to run it again while showing a progress bar. But you wouldn’t be the first…