-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Description
This is basically the same issue as #54, but that one is closed. The problem still persists, consider this example:
for i in tqdm.trange(1000):
if i > 500:
sleep(10)
It updates first time after the first 10-sec iteration, and the second time after more than 5 minutes (!) - I didn't wait for the second update. You may say this is a highly artificial case - but it doesn't seem so: for example, when you process items, some of which are skipped (e.g. already processed, or marked to skip, ...) and others require a lot of time. I myself routinely use tqdm with iterations in the order of minutes (with another faster inner progressbar, btw) and was really surprised to see the outer progressbar not moving for hours.
I expected the example at the beginning to show 501
almost immediately and then increase by one each ten seconds.
P.S.: yes, it works correctly with miniters=1
, but I could find that this is required only reading #54 (there is a paragraph saying like 'recommended for downloads' in the readme, but it doesn't say that the progress bar will work extremely incorrectly otherwise). And anyway, even if there is no way to make it work without additional overhead, I think miniters=1
must be the default option, as correctness is more important than speed. And then those who need to remove every possible overhead would specify None
or something, but as for now this case is really confusing.