ALGORITHM for accurate progress bar:
1) Analyze the total size of files to scan, say 128 MB
2) Start the scan(In-depth or smart)
3) Suppose: - IN-DEPTH scan gets 4 MB files scanned per second
- Smart scan gets 32 MB files scannned per second.
(since it's less thorough than in-depth)
(i) include time needed for archive scans in it. say it can scan 4 MB of an archive in in-depth & 16 MB in smart scan modes.
4) So, total time required: -IN-DEPTH scan=128/4 sec= 32 sec
-Smart scan=128/32 sec= 4 sec
5) Say the scan has been running for 2 sec now(time elapsed= 2sec).
-- So, time left: In-depth= 32-2= 30 sec
Smart=4-2=2 sec
6) So, progress bar SHOULD SHOW:
-- IN-DEPTH: 2/32*100= 6.25 % scan completed
30 sec left untill completion
-- SMART: 2/4*100=50% scan completed
2 sec untill completion
SO, HOPE I GAVE AN ACCURATE ALGORITHM TO DISPLAY SCAN PROGRESS WITHOUT ANY HICCUP.
this won't get stuck on 99 %
It's real simple, I've just written it so gigantically to explain clearly.
U realize this algorithm is nothing harder than speed-distance-time problems that we used to solve in junor-high
So, if u follow this algorithm, scan progress bar will be very accurate.
And hence provide users with a prediction when the scan will be complete & hence OFFER PEACE OF MIND TO UR CUSTOMERS.
***Tell me if u guys will add this feature...