Tuesday, July 16, 2019

Why Did Moving the Mouse Cursor Cause Windows 95 to Run More Quickly?

Retrocomputing (via Devon Zuegel):

Windows 95 applications often use asynchronous I/O, that is they ask for some file operation like a copy to be performed and then tell the OS that they can be put to sleep until that operation finishes. By sleeping they allow other applications to run, rather than wasting CPU time endlessly asking if the file operation has completed yet.

For reasons that are not entirely clear, but probably due to performance problems on low end machines, Windows 95 tends to bundle up the messages about I/O completion and doesn’t immediately wake up the application to service them. However, it does wake the application for user input, presumably to keep it feeling responsive, and when the application is awake it will handle any pending I/O messages too.

Thus wiggling the mouse causes the application to process I/O messages faster, and install quicker. The effect was quite pronounced; large applications that could take an hour to install could be reduced to 15 minutes with suitable mouse input.

Whereas, on classic Mac OS, you could pause certain processing by depressing the mouse button.

Update (2019-07-17): Dimitri Bouniol:

Even today, the main run loop mode will change and stop typical timers from running if you open a menu in a modern Mac app.

Kevin Purcell:

This was true of 3270 terminals on IBM mainframes running CMS on VM/370.

If you hit the spacebar you’d get a little hit of CPU time.

I recall numbers of mech eng and elec eng grad students sitting at 3270 tapping the keyboard in the late 1980s when running their FORTRAN codes.

Comments RSS · Twitter

Leave a Comment