What causes a program to lag?

2.19K views

Imagine you finished browsing on chrome and want to end your session… You click on that red X to close everything… And then your computer just hangs there. What causes this lag? Theoretically shouldn’t the computer be erasing stuff from memory, not lagging?

In: Technology

4 Answers

Anonymous 0 Comments

‘Erasing memory’ includes:

– writing to special tables in memory that previously occupied RAM is free

– closing all files, finishing writing to them, probably deleting some of them (and browser opens & creates tons if files)

– closing all sockets

– waiting for all subprocesses to close. if you have 100 processes and each writes 100 bytes to a drive before closing, that may take a noticeable amount of time as they can’t write all at once.

that being said, I don’t know why Windows struggles THAT much with closing apps. on other systems its more fluid, firefox on Linux closes nearly instantly.

You are viewing 1 out of 4 answers, click here to view all answers.