Why does it take a computer application so long to start up, but so quick to shut down?

699 views

Why does it take a computer application so long to start up, but so quick to shut down?

In: Technology

4 Answers

Anonymous 0 Comments

When you boot up an application, it’s code usually depends on packages of other code (either written by the main developers or often by other people) — and those packages need to be imported first so the applications code can run properly. The application may also then try to prepare itself for the assumption you’ll be using it — by reserving hard disk space, RAM storage, sending commands to your GPU etc.

However when you quit, the app doesn’t have to “unload” all those packages, it just needs to stop running. So it’s generally much quicker. Some apps still do need to “clean up” after themselves though, so either do that while you’re quitting or do it silently in the background after you’ve quit. Or, what’s becoming more common is that the developers are just expecting/relying on the operating system to clean up for them.

Anonymous 0 Comments

When started, a program has to load all it’s dependencies, libraries, etc, start a new window, display something on that window, and the rest is application specific. When closed, it makes sure everything is saved and commits self yeet off a building.

Anonymous 0 Comments

Running code can take many commands and checks to make it start. Quitting a application only needs one or a couple of commands to kill it.

Anonymous 0 Comments

I’d like to add one aspect. When a program starts, it basically has to make sure all the code it uses is in the right place in memory. That takes some time.

When the program is closed, however, it doesn’t always need to wipe all of that data – it can just tell the operating system (OS) “Hey, those big chunks of data that I used – I don’t need them any more, bye”. The data is still in the same place in memory for a while, but it’s ready to be overwritten by the next application that needs memory.

The process of just telling the OS that a chunk of data can now be considered free is much faster than to load the data there.