What causes that and why? I don’t see any added value in this, only disadvantages. Can that not be prevented or avoided?
Answer
The starting point is that users of computer programs are demanding and expect the computer to respond ‘immediately’ when it does something.
In the case of visiting websites, you can open several tabs at the same time and then open different websites at the same time. Such a website can contain texts, images, videos, but also scripts. Such a script is usually a short calculation, but a poorly written script can run for a very long time or even go into an infinite loop. And there are also scripts that consciously do ‘naughty things’ and want to perform a lot of calculations for that.
As a result, your computer and in the first place your web browser (Internet Explore, Chrome, Firefox, Safari, Opera, …) can become slow. To ensure that the computer can respond quickly in all cases (as the user is used to), a check has been built in to check whether a script does not demand too much attention and computer time. As soon as that is the case, you will receive a warning that the script has been running for (way too) long, and you as a user can choose to close that script. The advantage is that you can ensure that your computer continues to respond quickly by closing that script.
Your smartphone does that too: if a process stays busy on the user-interface thread for too long, you can also close it (or wait a little longer).
In summary, giving you the chance to shut down slow, long-running scripts keeps everyone else responding faster. Compare it to throwing ballast from a hot air balloon to be able to fly longer and/or higher.
Answered by
Dr Kris Aerts
software
Old Market 13 3000 Leuven
https://www.kuleuven.be/
.