Why did moving the mouse cursor cause Windows 95 to run more quickly?
retrocomputing.stackexchange.com
retrocomputing.stackexchange.com
I too witnessed the 'windows is running slow when installing' bug. I often would use the mouse cursor to 'mark' the position of the loading bar (we really are spoiled for speed these days). That way when I would walk-away from an install I could see if the progress meter moved while I was away. More often then not the progress bar would still be where it was when I had left. By moving the mouse activity would return and the installation would continue.
I always assumed it was the graphics that were not being updated. A small bug with the install would keep running but the lack of input interrupts caused the display to get 'stuck'. (That would explain the sudden 'jump' in progress bar movement as soon as I wiggled the mouse.)
But what newbies will bever know the heck of: dip switch settings for IRQ for modems.
Thats what literally got me into computers...
In order to dial up BBSs and play tthe Pit and dl warez.
—-
Ive told this story before, but in about 1992? Or so - i got grounded for a month because i had been calling in long distance to a bbs in san jose to play the pit - and racked up a long distance bill of $926 - my dad was livid.
He yelled at me and said “why are you wasting all this time with computers! Its never going to do anything for you!”
Years later after i became successful with yee olde computerz! He apologized to me and said “im sorry i yelled at you for that time you cost me all that money in long distance charges.”
Were you also calling into PCLink?
I used to have a challenge with my best friend at the time:
We used to call 411 and challenge to whom could keep the 411 operator on the phone longest.
I had this problem until I discovered a bug in a Major BBS door game (TradeWars 2002) that let me have unlimited BBS credits. No more charges on my moms phone bill and even was able to trade those for other things in real life. Early bitcoin in a way. Looking back on it, my need to get online overrode my ethics regarding either my moms bank account or the sysops running the BBS. Oh well.
And it was a summer month long binge on PCLink and BBSs...
(I later convinced my highschool to install a CAD network on which we installed a BBS Called Heaven and Hell and ran a warez site from there....
Fun times.
EDIT: Oh -- and it was run on an EverexStep Cube machine... I think it was a 386?
At which point you lit up your Havana Muy Gordo with a $1000 bill and said, "Don't sweat it?"
. .
[1] somehow just before college I got a used USR Courier HST. Then I sent it in with what was probably all of my hard earned beer money for upgrade to a Courier v.Everything... I still have that one, found it while moving https://v.gd/gF83mM)
And dip switches to set hard drives to primary/secondary. Get that wrong and your machine didn’t boot.
This is just me, oh my gosh. I thought I was the only one who did that. But now I come to think about it, it can't be true.
It has been a really long time since I used that technique last time...
Last time it was for the linux dropbox updater, last week.
I am also a fan of using another window so I can use the mouse and still have a marker to monitor progress.
Nobody ever complains if the process suddenly speeds up because progress was made before the timeout, as long as your initial estimate wasn't absurd (looks at Windows Explorer). Even a naive progress bar counting down the 60s timeout is more informative and satisfying to watch than an endless spinner.
Done in 30s ... I mean 15min ... ah, 10s ... 1hr 7min ...
Oh, come _on_ ...
It was so bad I ended up discovering Teracopy which was decent at estimation, and far faster at copying. Was a must-have until I migrated away from Windows.
1. Explorer attempts to do a file enumeration prior to copying, which sometimes could waste a lot of time.
2. It seems tools like Teracopy use buffering aggressively, which can speed up the copying significantly based on my experience on Windows XP with slow HDDs.
Are there any other points worth noting?
The other thing that I liked is it's non-blocking - you can continue doing copies while one is in progress, if it's to the same destination it gets added to the queue in progress. If different destination it goes in a new queue that waits for the first to finish.
I've seen dual progress bars: one for "overall progress" (each one of five tasks fills this bar 20%) and one for the current task (maybe downloading, maybe unpacking, maybe copying, maybe waiting for hardware to reply...)
I've been known to use Post-its and the frame of my monitor as a marker. Both are much easier with how prevalent dual-monitors are these days.
Most software doesn't feel any faster compared to Windows 95 (see Wirth's law). Also most shitware does not display a loading bar anymore, instead you get some spinning stuff that's just an animation.
In fairness, that's because users constantly complained about loading bars not being accurate (they'd freeze, change speeds, stop right at the end etc.), but having a "true" loading bar that proceeds smoothly basically requires solving the Halting Problem. So out it went.
But a few minutes later you'd be back to swap in floppy number 18
Mechanism is a bit different though: SufraceFlinger process that is responsible for acquiring touchscreen input, temporarily boosts CPU and GPU frequencies to make sure screen animations are nice and fluid.
Maybe the map turns as you turn so as to maintain compass north.
Of course, for most developers that might mean to not update/invalidate() a map view constantly :)
Only if they do not have enough load, that is. If you have an actually loaded background process on Android it by itself will keep the clocks high. If you have a process that has short bursts of work, though, then the duration of that burst will definitely vary in response to touch boost. This is all the same as "regular" linux as it's just an aspect of most governors (ondemand, interactive, etc...)
As in, touching the display will never make this loop go faster:
void busyLoop() {
Random rand = new Random();
int data[] = new int[1000];
for (int i = 0; i < data.length; i++) {
data[i] = rand.nextInt();
}
while (true) {
measure(() -> {
for (int i = 0; i < data.length; i++) {
data[i] = (data[i] * 4) % 1000;
}
});
}
}
The hypothetical measure will observe duration to normalize to a number and then it'll stay roughly there until thermal throttling kicks in.If, however, the loop was to look more like this:
void busyLoop() {
Random rand = new Random();
int data[] = new int[1000];
for (int i = 0; i < data.length; i++) {
data[i] = rand.nextInt();
}
while (true) {
measure(() -> {
for (int i = 0; i < data.length; i++) {
data[i] = (data[i] * 4) % 1000;
}
});
try {
Thread.sleep(5);
} catch (InterruptedException ex) {}
}
}
Then you would see the measured duration decrease when your finger was on the screen vs. not, because the kernel will consistently see that the task is not keeping the CPU it's scheduled on loaded above a threshold, so the clocks will go down all the way to idle.Told my IT friend who was loading my machine and he said "you're confused; I've installed hundreds of times and never seen that". So I turned his mouse upside down and waited. Voila! It hung.
Guess I owe my dad an apology now.
- Open Office won't print on Tuesdays: https://bugs.launchpad.net/ubuntu/+source/cupsys/+bug/255161...
- Can't send email more than 500 miles: http://web.mit.edu/jemorris/humor/500-miles
----
An odd feature of our campus network at the time was that it was 100% switched. An outgoing packet wouldn't incur a router delay until hitting the POP and reaching a router on the far side. So time to connect to a lightly-loaded remote host on a nearby network would actually largely be governed by the speed of light distance to the destination rather than by incidental router delays.
Feeling slightly giddy, I typed into my shell:
$ units 1311 units, 63 prefixes
You have: 3 millilightseconds You want: miles * 558.84719 / 0.0017893979
----
But surely for Sendmail to register a "connect" with a remote SMTP server would require at least one (or many?) round trips to the remote server, so one-way speed of light time doesn't seem like it would really be relevant. Am I missing something?
"The story is slightly altered in order to protect the guilty, elide over irrelevant and boring details, and generally make the whole thing more entertaining."
If memory serves he goes into further detail about the alterations and some common objections to the story in his FAQ:
Makes sense, I can share this story to people without any computer knowledge, but something explaining how connections are established would be wholly incomprehensible to them.
MS Word was one of the few ubiquitous tools that would compress images, and certainly one of the few that people could be counted on to know. MS Paint didn't support PNG until Win98, and even then wouldn't do it by default.
If you didn't go via Word, chances are you'd be emailing a 900kB BMP at a time when people used 28.8k modems to access Hotmail accounts with 2MB caps.
It's not just Notepad :-) I do this often, when I have to mark a lot of things.
Of course neither of these would demonstrate the effect they were talking about.
ggVG ggVG
I typed that into Notepad and it did exactly what I expected: it displayed 'ggVG' in the edit window. I can even save it to a file!Thank you for the tip.
Isn't it funny that many of us learned these sames ways of interacting with computers without being explicitly taught. If this were on the Internet, I would say it's a way to gauge whether you're a robot, but otherwise, it's just a measure of my impatience. Maybe it's just an acquired skill from growing up playing video games.
One of the older kids who hung out there would tell us newer kids that we could speed up loading by repeatedly pressing the up arrow key on the keyboard.
Of course us new kids didn't realize that the loading speed was completely determined by the cassette tape speed, which the keyboard couldn't possibly affect.
But at least it gave us something to do while waiting, and the older kids something to laugh at.
This was also common on IRC to get script kiddies to kick themselves.
while(GetMessage(&msg, NULL, 0, 0) > 0)
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
The mouse isr would cause a loop like this to execute at some point, processing all the messages on the queue. Win95 had preemption, but it ran at 100hz. Moving the mouse caused additional queue processing on top of the time sliced preemption.Not sure what the current status quo is.
But scheduling happens far more often than this tick rate, too, so it's only preemption for busy threads and controls the timing windows for things like DVFS.
To this day, when waiting for some long or compute-intensive operation, I tend to instinctively move the mouse around. I guess this may be why.
Ironically, even though I grew up on Windows, I don't remember any actual case of "moving the mouse speeds thing up" on this OS - I only remember the infamous Linux cases (mouse move regenerates entropy, unblocking processes that got stuck when generating a random number call). But there must have been something, and I must have experienced it early enough in my childhood.
(Like a caged leopard or mad scientist pacing back and forth.)
I could feel how responsive the connection and emacs were over time by the delay between typing and seeing the cursor move. Both the network and emacs contributed to the feeling:
There was the overall "weather" of the network: sometimes sunny and fast, sometimes sprinkled with light delays, and sometimes stormy congestion. Then there were occasional incidents that came and went, like network hiccoughs and emacs paging and grinding. And then there was the overall load of the system, which gave you the baseline delay (which gave it a very tactile day -vs- night feeling, since you got more of the machine to yourself during the night when it felt snappy, but it felt sluggish during the day).
It really felt like either the network, emacs, or both would fall asleep if you didn't keep them warm and lavish them with attention.
A VAX 11/780 running Gosling Emacs over a dialup had a very different feel than a PDP-10 running ITS Emacs over the arpanet. The busy VAX was bursty and had a lot of bumpy paging -- you had to keep your buffers warm or they would all get paged out and it would take a long time to wake back up, but there was no network delay from the direct dialup. While the PDP-10 ran smoothly like a well lubricated steam locomotive, sometimes slowing down when busy, but hovering around same speed instead of bursting, and the delay was mostly the feel of arpanet congestion and imps dozing off.
(Or so I imagined. I had a lot of time to sit and think while waiting for the cursor to move again, and the mind wanders and wonders what's happening...)
TOPS-20 had a wonderful ^T keyboard interrupt that you could type to instantly show the system load and time. (But of course you couldn't use that in emacs, which puts the tty into raw mode.)
Somebody at the university implemented ^T to 4.2 BSD on the cs department's busy VAX 11/780, by modifying the tty driver. But initially, there was no limit to how often you could type it, and calculating the current system load wasn't a trivial operation.
So on a fast terminal, if you held down and auto-repeated ^T, it would bring the entire system to its knees, and you could watch the load go up and up and up as you caused it to! Very satisfying indeed.
Eventually they put in a one-per-second limit on ^T.
Huh. I got into that habit recently, because over the past year, I've been frequently working on the go, by SSH-ing to my home desktop and using Emacs terminal frame (emacsclient -t)[0]. I do regular "weather checks" with ^A and ^E - because the hardware has its weather, SSH has its weather, and the link I'm on has its own weather too (particularly when using an LTE hotspot, though I've noticed even when being in the same LAN, the response time is not always consistent).
What's old is new again :).
--
[0] - With terminal emulators supporting 256 colors, it looks very similar to the GUI Emacs. This mode of working is really quite good, and lets me use my underpowered sidearm 2-in-1 tablet/netbook to do things that would ordinarily require powerful hardware.
After a million or so keystrokes and feedback delays, your brain can't help but build a model of what it means.
Host *
ServerAliveInterval <suitable number>
to my SSH client config. Works wonders.> Huh. I got into that habit recently, because over the past year, I've been frequently working on the go, by SSH-ing to my home desktop and using Emacs terminal frame (emacsclient -t)[0]. I do regular "weather checks" with ^A and ^E - because the hardware has its weather, SSH has its weather, and the link I'm on has its own weather too (particularly when using an LTE hotspot, though I've noticed even when being in the same LAN, the response time is not always consistent).
You may find mosh [0] to be useful, as it buffers input client side to remove input lag.
[0]: https://mosh.org/
You can test it by running `ed`:
ed scratch.txt
2096
^T
load: 0.57 cmd: ed 74469 waiting 0.00u 0.00s
q
Running `stty -a` lists all of the characters that have special meaning when the TTY driver handles input this way, before the program sees it.macOS has this too!
I actually wrote apps in the Win95 days, and I can say that async (i.e. overlapped) I/O, which seems to be what he's talking about in the rest of the answer about IO completions, basically does not exist at all on the Win9x series; it was an NT-exclusive feature. There were some bits and pieces that seemed to work somewhat from what I remember, but to quote my trusty old WIN32.HLP regarding the ReadFile function:
"Windows 95
For asynchronous read operations, hFile can be a communications resource, mailslot, or named pipe handle opened with the FILE_FLAG_OVERLAPPED flag by CreateFile, or a socket handle returned by the socket or accept functions. Windows 95 does not support asynchronous read operations on disk files."
...so his example about file copying and installers is invalidated. The correct answer(s) are of course lower down on the page and in the comments, where everyone talking about "pumping the message loop" gets it right.
The second anecdote about scrolling behaviour also hits vaguely beside the point; it has nothing to do with multitasking, is only tangentially related to "pumping the message loop", and can be explained very simply: moving the mouse causes a WM_MOUSEMOVE message to be sent to the window, containing the new coordinates of the cursor. The edit control that Notepad is composed of handles this message when in selection mode by checking if the position is outside of the control, and scrolls appropriately by a single amount if so. If you continue moving the mouse outside the control with a selection highlighted, the generation of WM_MOUSEMOVE continues, and thus the scrolling too. Stop moving the mouse, and the scrolling stops. There is nothing else to it. Other controls/windows (e.g. browsers) may handle this select-scroll behaviour differently; some will start a timer that continues to issue scroll messages as long as you hold down the button, and some even fancier ones will vary the rate of the timer depending on how far from the control's edge the current position is (so you can adjust the auto-scrolling speed easily.)
Only the third answer is when we start getting closer to an accurate explanation, the fourth answer about WM_TIMER is quite off-the-mark, and then the rest of them vary in accuracy between "close, but not quite" and "no, just no."
(Incidentally, this is also one of the reasons I don't use SE/SO.)
If I moved the mouse the HDD would spin furiously but once the mouse stopped it would resume trickling the writes/reads again.
A work around if you have a motherboard that is particularly bad about this is to use the digital audio output (S/PDIF via an optical or RCA jack) to connect an external amplifier or you could stream it via software. This tends to only be an option if the machine is stationary and not terribly realistic for people with a laptop on the go.
For what it's worth, this _is_ hacker news. I concede not everyone is tech savvy but I tend to respond to comments as if they are.
> https://en.wikipedia.org/wiki/Electromagnetically_excited_ac...
This happened if you kept the mouse just inside the window and moved it about 10-20px up and down in/out pf the window in the direction of the selection.
It was a way for me to scroll faster than with the wheel or cursors on web pages if you selected some text and then kept the selection on the end of the screen and moved the mouse wildly in the edge of the screen.
As I was younger then, there was probably a better solution to do this but I was not aware of it.
"During installation constantly move the mouse in a circular motion over the installation window. This speeds up installation roughly 2-3x"
Good times :)
I always assumed that Windows95 was just scared of mice, so if you shook one at it, it would either run faster in fear, leaving a trail of random disc sectors, or suddenly hide under its special blue blanket and refuse to come out again.
I couldn't debug it normally, or even get a clue about which package needs to be downgraded, because I can't pop over to the terminal without unjamming it. So I'd need another machine with which to SSH in, and those are all unusable ATM (well, I probably just needed to suck it up and install SSH on the phone). But ${somehow} I found out that triggering a redraw with ${something} also unjams it, so I set the clock in the XFCE panel (also GTK, FWIW) to display seconds as well. Now it still jams but always for less than a second.
Sorry, something resurfaced-- I think I remember now that I switched on seconds for the sake of finding out more precisely how long a jam would last. Immediately it became obvious that they didn't last long anymore, and that the reason it used to be "30-ish seconds" was whenever the minutes finally changed, it broke loose just the same way.
All these years I've been wrong!
This is a problem for NTP developers - finding real serial ports on modern hardware
4 channels realtime audio + 5 osc's on a 286 out the PC speaker. Phenomenal. Sounded like shit until I got a Sound Blaster, though....
> The effect was quite pronounced; large applications that could take an hour to install could be reduced to 15 minutes with suitable mouse input.
The game of hunt is clocked by the arrival of events. So that is to say, the arrival of packets from the game clients into the server drives the game forward. The more furiously people play and the more players there are, the more rapid is the movement of automatic objects, like shots traversing through the maze.
I last played this in 1995. I had a WYSE 50 terminal hooked up to a Linux box and played with a friend. One of us was on the console, one on the terminal.
I remember I had to patch something socket-related in the source code to get it working.
One thing they discovered was that Windows 95 would enter a tight CPU polling loop if you held the mouse button down. So, don't do that.
[Edit: dammit, I cannot find the paper. Sorry. It was really interesting.]
import ctypes, time
def move(x, y):
ctypes.windll.user32.SetCursorPos(x, y)
for x in range(10000000):
move(0, 0)
time.sleep(0.01)
move(1, 1)
... and all was well.(When I upgraded to a 4K monitor things got worse and the cursor fiddle doesn't help).
for x in range(10000000):
Why not just use `while True:` ?I think in the end the solution was to just fire off a X/xdm pair as I wasted a few days looking at scheduling/numa/shared interrupts/etc trying to get a good solid solution that didn't require starting X. We ran it like that for a couple years until eventually someone tried it again (after a bunch of software/hardware upgrades) and the perf didn't fall off.
I always thought that this scroll behavior is known and special in that it helps precise scrolling. I know winapi and why this happens, but never viewed it as a wild bug. Can’t recall now, but I think Mac and Linux behave the same way. Can someone confirm that?
But I remember the times when that blog didn't look like a webdesign internship project in progress. And there were interesting comments…
https://devblogs.microsoft.com/oldnewthing/?p=36423
“One danger of the MsgWaitForMultipleObjects function is calling it when there are already messages waiting to be processed, because MsgWaitForMultipleObjects returns only when there is a new event in the queue.“
We were doing some processing on a database and updating the progress bar every record. We processed the UI messages at that point as well so any click on Cancel could get through.
As customer databases grew, the processing began to exhibit this behaviour.
If I remember well, we fixed it by only updating the progress bar every 1%. It may have been more complicated than that though, I had moved on to another job when the fix was done.
I miss this mysterious, charming, golden era of tech.
EDIT: And of course, a person who should not be named at the time remarked: "Computers always do the same thing, DKII can't be crashing sometimes and other times not..."
Funniest article I’ve ever seen in the Microsoft KB! But it worked.
Unfortunately KB articles seem to be decaying at an alarming rate; only the archive has luckily saved this one from vanishing forever: http://web.archive.org/web/20140105042459/http://support.mic...
When marking text to copy and making it scroll, moving the mouse left and right will speed up the scrolling sometimes.
Try it in a long Word doc or in Firefox.
This all makes a lot of sense now.