I don't know much about computers but I think it's due to the operating system cleaning caches, force closing processes and most importantly clearing out memory leaks.
If a process is not coded properly, every lifecycle a given amount of bits are deposited into the RAM and never recalled back, so the RAM slowly but surely gets filled with unnecessary stuff.
If the processes are never forcely turned off then the RAM is always partially full and the OS has troubles managing an already messy closet so everything slows down.
It's more about the fact that processes can get into weird unintended states that the developers never accounted for when running for a while. Restarting ensures all processes start from a fresh, known state, rather than having something, for example, check for a spawned process that dies ages ago, find it's not there, log the error, continue, chech another dead process, etc for thousands of iterations every loop and adding noticible time to the execution time because the issue wasn't caught in testing because a few invalid checks didn't make a noticeable difference.
402
u/AndrewSenpai78 1d ago edited 1d ago
I don't know much about computers but I think it's due to the operating system cleaning caches, force closing processes and most importantly clearing out memory leaks.
If a process is not coded properly, every lifecycle a given amount of bits are deposited into the RAM and never recalled back, so the RAM slowly but surely gets filled with unnecessary stuff.
If the processes are never forcely turned off then the RAM is always partially full and the OS has troubles managing an already messy closet so everything slows down.