It’s 2021, but truth be told, loading bars, or ‘progression’ bars, are still as bad as when they were introduced into our lives. Which raises a question… Why is it so complicated for a computer to determine how long a task will take?
Let’s try to understand!
Loading bars never get time right. Why?
Therefore, the bars of loading they exist in our life in many ways, it is we who do not always realize they are there.
For example, when you want to pass the crosswalk and the green traffic light has a “timer” showing how many seconds you have to make the route, this is also a kind of progression interface. In fact, even the screen of an elevator, which has the great mission of showing which floor it is on, also serves to get an idea of the progression of this machine’s task.
In short, the idea of this type of system is for you (the user) to have an idea of how long it will take to do a certain task, demonstrating that something is really happening. That is, exactly what the progress bar tries to do in the computational world.
After all, without some kind of progress bar, in the computer world, you would never know if the task is progressing, if it’s stuck, or wonder if you forgot to press the ‘Start’ button.
How does a progress bar work? (Loading bar)
Very briefly, a progress bar takes the task at hand, breaks it down into subtasks, estimates time for each of them, and then displays the bar, a percentage, and sometimes an estimate in minutes, of how long. the process will take time.
For example, we have a very simple example of a progression bar that never fails. Go to YouTube, click on any video, and you’ll see the progress bar slowly growing as you watch more and more video content. (If the video is 100 seconds long (1m40), and you’ve already seen 10 seconds, then you’ve seen 10% of the video, and the bar is taking up 10% of the total space.)
However, in the case of this bar, the mission is very simple! The YouTube reader has the simple task of presenting the video at a stable framerate, nothing more and less than that. Installing a program is not that simple anymore!
How does installing a program work, and how does the bar estimate the loading time?
Well, an installer will almost always have to download extra files, will have to decompress various types of files, will analyze, read, install, and later delete some of these files, and finally, will make some changes to the system.
The development team knows more or less how long each task will take, and as such, the time is more or less predetermined. However, each system is a system. Therefore, the file download part will be impacted by your internet speed. File decompression will be impacted by your machine’s processing power. Reading, installing and removing files will be impacted by the speed of your storage, especially if it is a traditional hard disk, and finally, the part of system changes will depend on the operating system.
In short, it is virtually impossible to have a 100% reliable progress bar, because every subtask of installing a program has to deal with different problems.
In fact, even when trying to copy a file from one side to the other, the bar is simply unable to show a stable progression. Do you know why?
Well, we could think that the progression time would be conditioned by the number of files to be transferred. However, each file can (and probably is) a different size.
So maybe it’s a good idea to take into account the size of the entire moved files. Well… That doesn’t work either, because copying or moving small files is much faster than moving large files.
There are more conditions!
Imagine that you want to render a video, and when you finish editing it, the progress bar appears, telling you how much, more or less, is left until everything is ready.
It looks like everything is going to run in a linear fashion, right? Wrong! As it is a demanding workload, the system can overheat, and as such, the frequencies of the key components will have to go down, which in turn will have an impact on the machine’s performance, and consequently on this same estimate.
There is no 100% reliable solution, which is exactly why the progress bars sometimes seem super fast, and out of nowhere, ‘stuck’. In fact, have you ever used the nail technique? In other words, put your fingernail on top of the bar, to see if it moved an inch? I already!