166 points · by rbanffy · 6y ago · 132 comments
I know it’s been posted here many times about how computers have become perceptually slow, but that Indy after a couple minutes of poking around really drove the point home in a way that no numbers ever could.
Computers have gained a lot, for sure, but they’ve also lost a lot. I wonder if it’s even possible to make a modern computer fast in a way that feels fast again.
In old GUIs (e.g. Windows 3.1), many things—file associations, program launchers, etc.—got loaded from disk into memory once—usually at GUI startup—and then the state of those things was maintained entirely in memory, with programs that updated the on-disk state of those things either 1. also independently updating the in-memory state with a command sent to the relevant state-database-keeper; or 2. requiring that you log out and back in to see changes.
Today, we don't have everything sitting around loaded into memory—but in exchange, we have soft-realtime canonicity, where the things you see in the GUI reflect the way things are, rather than a snapshot of the way things were plus (voluntary, possibly missable/skippable) updates. Install a program that has higher-than-default-binding file associations? The files in your file manager will update their icons and launch actions, without the program needing to do anything.
There's ways to eat your cake and have it too—to have on-disk canonicity and instant updates—but this require a very finicky programming model†, so we haven't seen any GUI toolkit offer this, let alone one of the major OSes do so.
† Essentially, you'd need to turn your Desktop Environment into a monolithic CQRS/ES aggregate, where programs change the DE's state by sending it commands, which it reacts to by changing in-memory state (the in-memory aggregate), and then persists a log of the events resulting from those commands as the canonical on-disk state (with other aggregates fed from those to build OLAPable indices / domain-state snapshots for fast reload.) This gets you "Smalltalk windowing semantics, but on a Unix filesystem substrate rather than a VM memory-image substrate."
I'm going to say the three largest contributions to general desktop lag are:
Animations and intentional delays. It can't be said, how much faster a machine feels when something like MenuShowDelay is decreased to 0, or the piles of animations are sped up.
Too many layers between the application draw commands and the actual display. All this compositing, vsync, and minimal 2d acceleration creates a low level persistent lag. Disabling aero on a win7 machine does wonders to its responsiveness. But even then pre-vista much of the win32 GDI/drawing API was basically implemented in hardware on the GPU. If you get an old 2d win32 API benchmark, you will notice that modern machines don't tend to fare well in raw API call performance. 30 seconds poking around on youtube, should find you a bunch of comparisons like this https://www.youtube.com/watch?time_continue=25&v=ay-gqx18UTM.... Keep in mind that even in 2020 pretty much every application on the machine is still relying on GDI (same as linux apps relying on xlib).
Input+processing lag, USB is polling with a fairly slow poll interval rate (think a hundred or so ms). Combined with the fact that the keystrokes/events then end up queued/scheduled through multiple subsystems before eventually finding their way to the correct window, and then having to again reschedule and get the application to retrieve and process it via GetMessage()/etc. Basically, this is more a function of modern software bloat, where all those layers of correct architecture add more overhead than the old school get the ps2 interrupt, post a message to the active window queue, schedule the process managing the window messages. (https://social.technet.microsoft.com/Forums/windows/en-US/b1...)
There are a number of other issues, but you can retune those three areas to some extent, and the results are a pretty noticeable improvement. Having someone at MS/etc go in and actually focus on fixing this might have a massive effect with little effort. But that doesn't appear to be in the cards, since they appear to be more interested in telemetry and personal assistants.
My points were under the mode of thought where you look at a modern system already aimed at being "fast because it's lightweight" (e.g. XFCE), and then you ask why it still feels laggy compared to BeOS/AmigaOS/etc.
Where such "lightweight" DEs do have perceivable latency, that latency mostly comes down to operations hitting the disk where these older systems didn't. (Also the input stack, yes, but that's not universal: modern hardware still has PS/2 ports, and modern OSes still access those with rather direct reads. Many gamers swear by PS/2 peripherals—though probably mostly for cargo-cult reasons.)
Some of the minimal-est Linux WMs, e.g. Fluxbox, are run entirely from memory once started, and so are comparably fast—but need an explicit restart/reload to do anything. Plus, the apps launched in the WM aren't designed with the same paradigm, so most of your experience there is still slow.
These animations effectively increase the input lag significantly. Even with them turned off there are extra frames of lag between a click and the updated widget fully rendering.
(Everything below refers to a 60 Hz display)
For example, opening a combo-box in Windows 10 with animations disabled takes two frames; the first frame draws just the shadow, the next frame the finished open box. With animations enabled, it seems to depend on the number of items, but generally around 15 frames. That's effectively a quarter second of extra input lag.
A menu fading in takes about ~12 frames (0.2 seconds), but at least you can interact with it partially faded in.
Animated windows? That'll be another 20 frame delay, a third of a second. Without animations you're down to six, again with some half-drawn weirdness where the empty window appears in one frame and is filled in the next. (So if you noticed pop-ups looking slightly weird in Windows, that's why).
I assume these two-frame redraws are due to Windows Widgets / GDI and DWM not being synchronized at all, much like the broken redraws you can get on X11 with a compositor.
> USB is polling with a fairly slow poll interval rate (think a hundred or so ms).
The lowest polling rate typically used by HID input devices is 125 Hz (bInterval=8), while gaming hardware usually defaults to 500 or 1000 Hz (bInterval=2 or 1). Most input devices aren't that major a cause of input lag, although curiously a number of even new products implement debouncing incorrectly, which adds 5-10 ms; rather unfortunate.
https://epub.uni-regensburg.de/40182/1/On_the_Latency_of_USB...
On the software side, operating systems, desktop environments, GUI SDKs, frameworks, and so on could all take the problem a lot more seriously, but I wouldn't hold my breath waiting for that. There are too many people involved who believe it's reasonable to pause and play a little animation before doing what the user asked for.
Tragically, it seems the only way to completely get rid of tearing in youtube is to re-enable Aero :( (at least with nvidia hardware). RIP classic.
There are other forces at work.
For instance on my primary workstation after a period of time from cold boot, pretty much everything is sitting comfortably in 32 GB of memory. A lot of time is more due to the
1) sheer volume of crap that has to be shuttled in memory, because memory accesses still aren’t free 2) there’s a surprising amount of repetitive CPU intensive tasks just to get a program started up on merely bookkeeping tasks like linking, conversion, parsing.
In addition to all the built in latencies already mentioned.
To prove this you can setup a system using a RAM disk and notice that responsiveness is often still subpar.
Special example for me is Chrome, which has a huge singleton in the form of Browser Process that can make your experience a hell even if all other chrome processes are idling - simply because it's the central hub that handles among other things all of Input handling and UI.
This compounds with other latencies, where often I can start building patterns of "if a windows containing that kind of content is on, expect macOS WindowServer to start lagging insanely despite being under low load)
To the point that old Macs had most of the system routines in ROM[0].
EDIT: After googling SGI workstation models I think what I used was actually most likely an O2[1]. Great design, I remembered its distinct look even after so many years.
Windows Explorer gets your particular example right: When you copy a bunch of files into a folder, it will highlight all of the copied files after it is done, so it doesn't matter if you saw the progress bar or not.
However, this was a trust thing, and not an innate limitation of human capacity.
Now that we’re in 2020, I would argue that almost 0 users need that crutch.
If the work is done, it’s done. Similarly, employees on early keyboard-only terminals didn’t need any delay either. They trusted that when they said do X, the system did it. How else could you process dozens (or hundreds!) of items a minute?
Hmm, perhaps if you replace the word "latency" with "duration"?
"Whoa, why does this seem so much more responsive than my modern machines?" Two things, I think: 1) the mouse cursor is being updated with every vertical refresh (80Hz), and 2) the latency of the CRT must be lower than an LCD.
Not bad for a 700MHz, 18 year old machine!
LCDs that aren't optimized for low latency will generally just buffer a full frame before displaying it, coupled with a slow panel these will typically have 25-35 ms of input lag at 60 Hz. LCDs meant for gaming offer something called "immediate mode" or similar, where the controller buffers just a few lines or so, which makes the processing delay irrelevant (<1 ms). The image is effectively streamed through the LCD controller directly into the pixel array.
I just started using Linux part time on the desktop, and it’s significantly more responsive than MacOS, to the point that I prefer using it, even though the Linux UI otherwise stinks in a lot of ways.
I seriously doubt it's an SGI optimization.
I had an SGI Octane (multiple levels higher than an Indy). I've never felt IRIX's UI was noticeably more performant the contemporaneous Windows running on standard consumer PC hardware..
Xsgi included some interesting optimizations, starting with how it was a compositing X server and a feature that is known to break GTK3 all the time - Xsgi would provide a low color visual as the first choice, and this was reflected in the provided Motif and other libraries and exploited by software developed for Irix - the latter mostly because you could not depend on the end user having a 24bit display, though.
This means that the bandwidth requirements across all stages of drawing was reduced for common UI components, instead of slinging around high resolution 32bit RGBA bitmaps for everything as is the norm today on Linux. I haven't checked, but I strongly suspect that the more ascetic UI controls combined with classic X11 drawing calls also resulted in higher speed vs. slinging lots and lots of bitmaps with overdraw using XRender.
For more on that, consider checking the literature written about avoiding overdraw on Android and how much of an impact it had on latency of user interface. iOS, btw, actually did a lot of dirty tricks to essentially prevent developers from doing any overdraw without explicitly going for it, and supposedly a strong part of early review process was checking for overdraw - because the actual iPhone hw was not that powerful and they ran close to the bandwidth budget per frame.
One big problem with all these old "workstation" computers, is that while us hobbyists still have our ways of getting the OS installed... The actual applications people ran on them almost seem lost to time. When software is so unbelievably expensive during its heyday, it tends to not make the jump over to "abandonware" repositories once its time has passed. This unfortunately makes demos of these old machines far more boring than demos of old PCs.
EDIT: After googling SGI workstation models I think what I used was actually most likely an O2[1]. Great design, I remembered its distinct look even after so many years.
There wasn't a lot of movement in the 3D workstation space at the time, whereas PC 3D accelerators were taking off big time. So you ended up with a system that was faster, a lot cheaper and where the regular PC maintenance software and infrastructure could be used (boy, homogenous Unix devops was a nightmare).
Having said that, CATIA was more a workhorse CAD and CAE software, so probably not the best to show off neat UIs, and amongst engineers it had a somewhat ponderous reputation.
Some software, made on IRIX, like Alias and I-DEAS did show it all off. Other apps ran great, but did their own thing no matter what UNIX you were on. Then again, some of those interfaces were amazing in their own way. I would count CATIA R5 in that group for sure.
If your meteorologist didn't want to hold a remote, the weather producer would have to sit in front of the workstation with their hand over the spacebar waiting for the right cues to advance to the next loop/pause point.
At some stations, it wasn't about the talent not wanting to hold the remote, it was about the station not having an engineer on staff who could rig up the remote.
At many stations in the 90's, and even some today, the "remote" is nothing fancier than a garage door opener, with the relays hooked into a breakout box to a DB25 serial port.
These machines are excruciatingly slow by today's standards and I wouldn't want to run modern software on them. Still, they are the dinosaurs of the PC ecosystem - evolutionary dead-ends that hint at what could be. Who wouldn't want to study a living dinosaur?
This page about AVS is dated 1995 and cites a 1989 paper:
https://web.cs.wpi.edu/~matt/courses/cs563/talks/avs/avs.htm...
Piled up a bunker of Sgi machines, O2, Octane, Indigo, Indy, most very well equipped with the advanced memory and graphics options.
Alias, I-deas, Maya, Adobe, 3DS Max... Let's just say I could license most of that at will due to an error...
Learned a ton of high end skills that I benefit from today too. Great fun. And amazing demos. Putting those together was a total blast. People would get blown away using Showcase, the Sgi tools for video capture, audio, and Composer to mix, RIP, burn. This was mid 90's when most people were using Win 98, or maybe NT 3.5.1
Let's also say I got rid of said error (so don't ask) and gave the whole lot away to a 20 something me just itching for those same experiences. Those machines were well loved and used. Cool.
I needed a change away from that kind of computing as it went on the wane. Didn't want to look back.
But at the peak? I was very seriously productive on Irix. The Indigo Magic Desktop took everything I ever threw at it.
And one could flat out bury those machines with a heavy workload and still the UX was golden, responsive almost as if idle!
At one point, at some conference, the head scientist at Sgi said, "We turn compute problems into I/O problems."
How the machines performed showed that ethos off well, IMHO.
Honestly, today on say, Win 10, I can do all I did then on a laptop, but not enjoy it as much as I did that environment. It is responsive and fun!
Big software on Irix remains one of the peak computing experiences I have had. Damn good times.
I may have to put this on a Linux install and have some fun.
In my view, the Irix scheduler is insane good at balancing UX with workloads. It may not always be the peak possible throughput, but a skilled user can continue to blast through their tasks pretty much no matter what the OS load is.
On a lark, I got to try an extreme example of that:
Irix 5.3 on an Indigo Elan, 30Mhz CPU. I forget which one. I want to say R3k. (Check Ian's SGI Depot for more info)
I compiled "amp", which is an optimized mp3 player that formed the basis of many players after it was written.
At 30 Mhz, that Indigo Elan could play up to 192Mbps mp3 files, over NFS, while the desktop remained responsive.
At 256Mbps, CPU load was about 95 percent. Would glitch on occasion.
I found that quite impressive personally. I used that little Elan as a X terminal for a while and it was a pleasure to use.
...ah, Sgi.
Damn. Say what you want, their stuff was fun, had amazing docs, and got work done.
[Looks at Android / Win 10]
Meh.
That's part of why I scaled down. Unloaded that gear and went small, embedded retro for my fun computing. The work is easier today, and fine by me, because it is just work.
By glitch, I mean the music would drop, not the desktop.
One big problem with running a 3rd party OS on these old machines (specifically SGI, Sun doesn't have this issue) is that they tend to not really support any of the hardware that actually makes these machines interesting.
It is the close marriage between IRIX and the hardware and top engineering that shines.
I use that machine for what i want to use it, i also use my C64 as a Webserver and my Leemote-Laptop as my Mainbackup. Better having Hardware you can use for something then not...and you know, you can reinstall Irix later if you want.
That said the desktop looks amazing! Love the theme.
Seeing this question asked makes me sad. If you are browsing this on Linux then you're probably using code descended from Netscape which was developed by a guy called Zawinski on an SGI Indy.
Or if you have seen a movie, then all the special effects are descended from work done on SGI machines.
If you have fuel in your car, the oil field was probably originally found after running seismic analysis on an SGI. They were famous for their movie work but Oil & Gas was actually a far bigger market for them.
If you have flown anywhere, the pilot was trained on a simulator descended from technology developed by SGI.
If you program C++ then STL comes from SGI. As does the XFS filesystem.
If you have seen a weather forecast on TV, that probably was done on a Cray, who for a while were owned by SGI and who developed a lot of their tech. Many TV stations used SGIs to render the forecast on the green screen behind the presenter too.
If you have played Nintendo, the MIPS processor in it was developed by SGI. If you play games on PC, OpenGL was developed by SGI.
They were once one of the most influential computing companies in the world. Now they are merely a legend, and a fading one at that :-(
These workstations were incredibly powerful and extremely expensive (think > $250,000 for the higher end gear in the 1990s) but pretty amazing.
Also, for the time it had very advanced user interfaces. SGI Irix was the name of the OS which ran on these machines.
However, after thinking about whether I'd actually use MaXX over GNOME for a few minutes, I decided that there was no compelling reason to do so other than nostalgia.
Has anyone tried this out and decided to use it as their daily desktop? If so, I'm interested to hear your experiences and rationale. Cheers!
Also I think FVWM was heavily inspired from this, and I’ve used that as a very efficient UI over VNC (gradients, images, rounded corners, etc. are expensive in terms of bandwidth. The minimalist aesthetic of this interface conveys a lot of structure in little data).
At my first software development job in the mid 90s, the "cool" basement room with all of the smart/weird developers in it had a a mix of Sun SPARCstation 10/20 and Sun Ultra 1 workstations.
There was also this one weird SGI O2 they had just bought to port their software to the IRIX platform, but noone wanted really wanted to use it, because of IRIX. So I picked that workstation, just to be in that room. Smartest decision of my life - what I learned in there defined my career.
The Irix Interactive Desktop (based on Motif) felt so incredibly responsive on the O2, compared to Motif/CDE on the Sun workstations. It was almost BeOS-like in that regard. It was the little touches that mattered. A random example: the CPU usage monitor updated at like 10-20 Hz, instead of like 1 Hz on the Sun workstations.
Not that anyone really used CDE in normal work - other window managers were far more efficient. I ended up using http://www.lysator.liu.se/~marcus/amiwm.html on this O2.
edit: Remembering, I got the machine with original SGI keyboard, mouse and screen.
I'm more interested on reliving the CEDAR/Tioga interactive desktop environment pioneered by the Xerox R&D team back in 1980s/1990s for their in-house productivity tools [1]. The system still have some productivity enabling features that are still not widely used as of now. Xerox also managed to port the system to SunOS at the time.
Anyone aware of any effort or clone that can enable CEDAR/Tioga to run on or emulated Linux?
I found out two years later that the root password was the empty string.
Then there was the time I went to Syracuse for the first conference on Java for scientific computing and Geoff Fox had two identical twins from eastern Europe to run a demo on two workstations hooked up to a big SGI computer unsuccessfully which Geoff answer with 'never buy a gigabyte of cheap RAM'.
For the youngsters, back when we had multiple prototypes of Stepanov's work for the C++ STL library, SGI was one of the companies hosting the documentation.
And then there was OpenGL, while ARB was formed in the process to standardize IrisGL into OpenGL, reading the documentation from the source was much better.
I think it worked remarkably fast even on 56k connection, and definitely worked fast on 512kbit that became available around that time.
(And there won't be an ARM version, I guess?)
I wonder if it has the Twilight background
Unfortunately it's pretty slow.
Beyond aesthetic reasons, it's hard to understand when one would really use these for daily driving. Anyone using this or CDE able to offer insight?
Also similar to bullet journaling, it doesn't take a modern DE to do so. An old one with a usable text editor will do fine.
In fact the clean lines, sensible design, and visible pixels give some of us a mental cue toward a simpler, gentler productivity reset. I find that my main DE is much less compelling in that way, modern though it may be.