1 comment

[ 2.8 ms ] story [ 14.8 ms ] thread
There's a technique I've been using for progress bars in ArchiveBox lately, and thats "asymptotic progress bars".

They fill logarithmically, so they still feel fast for the majority of tasks that execute quickly and finish within a few seconds, while remaining responsive and showing progress even for the longest running tasks.

https://github.com/ArchiveBox/ArchiveBox/blob/dev/archivebox...

I've pulled it out into a gist here because I think it's generally a neat technique and works in almost any case where you are uncertain of total task duration.