Due to below line in the code, the updates do not arrive when they come in bursts.
In practice, I encountered a case where 3/4 of the process happened immediately (due to caching), but the progress bar stayed at 0 for the next hour.
|
if (time_delta >= self.update_interval) or (self._progress == self.total): |
Instead of only basing updates based on time, perhaps it would be good to also update if the progress was significantly changed or maybe just based on the progress difference instead of time? I think updates based on the amount of progress - say at least 1/4000th of progress - might make sense, because most displays cannot display more than 4000 pixels in the width anyway.
Due to below line in the code, the updates do not arrive when they come in bursts.
In practice, I encountered a case where 3/4 of the process happened immediately (due to caching), but the progress bar stayed at 0 for the next hour.
ipypb/ipypb/progressbar.py
Line 220 in 2cc079d
Instead of only basing updates based on time, perhaps it would be good to also update if the progress was significantly changed or maybe just based on the progress difference instead of time? I think updates based on the amount of progress - say at least 1/4000th of progress - might make sense, because most displays cannot display more than 4000 pixels in the width anyway.