Why do software nowadays take so much more memory and processing power (2020)
dietpi.com
dietpi.com
I was there for most of the old machines and my recollection is they were always slow, which is why there was a relentless race to upgrade to a faster machine and why for a very long time people replaced their computer once a year. If software and old machines were so snappy then there would have been no reason to buy a new computer, and the industry would have stalled in 1984.
This trope of "how did things get so slow, they were fast in ye olde dayes" is just an incorrect blurred memory of they way things were.
AND if the software was faster in Ye Olde Dayes, it is because it did less.
Of course it's not possible to generalise, but for the most part this is true - old software did less than modern software. The pervasive experience of using old computers was waiting.
My M1 Mac running 2 IDEs, 3 web browsers, email, terminals and several other apps is ridiculously, mind blowingly, insanely fast - so fast that anyone back in 1990 would have drooled themselves dry to have that speed.
I agree with OP. Generally computers today are much faster than they were in the 90s.
For a long time printing a largeish string to a buffer would crash Emacs, and it still lags vscode in opening large files in my experience.
teams still takes the same amount of time to load.
It takes me 25 minutes to scroll back 3 years in large chat in what’s app desktop client
It takes me like 2 minutes to scroll back same amount in telegram desktop client
This machine had a physical power switch. You could not put it to sleep, so it required a cold boot every time. At boot, it would run a _very slow_ self test of all 16MB of memory, after which it would spend another minute loading drivers under DOS before spending another minute booting Windows.
If you wanted to go online, you spent another minute waiting for the modem to dial out, and 10-15sec for a well-optimized page to load in Netscape. In many cases, like wanting to look up information on some subject, it was faster to put the Encarta CD in the drive, wait for it to spin up and for the program to launch, and search from that.
If you wanted to do _both at the same time_, you could do that! But be prepared for the machine to become slow as molasses as it swapped out to that 4200rpm drive.
Fast forward to today. My laptop is in standby 80% of the time. It's usually reconnected to Wi-Fi before I can enter my password, and I can look up an article on Wikipedia in under 15 seconds of having picked the laptop up.
I disagree wholeheartedly that computing has become slower. I can achieve the same results in a fraction of the time it used to take.
Looking at the bigger picture, just having a lot of OSS nowadays having apps hiding in the background rather than being killed; constant updates and pinging of servers by apps; etc means that we now have a much bigger, bloated footprint.
A lot of things used to be slow, but they involved doing a lot of math or loading data from external storage. The computer "staples" of simple spreadsheets, text editing, using a calculator etc had a faster user experience than today's computers.
But you are actually right that software "did less". The thing is that most applications don't need to "do a lot". What a lot of users need from computers changed little, but we added a ridiculous amount of overhead to it.
“The most amazing achievement of the computer software industry is its continuing cancellation of the steady and staggering gains made by the computer hardware industry.”
(Often a reasonable trade off, imho)
I was astounded when I first used ripgrep.
How many instructions do you need in assembly to compute `1+1`? How many instructions do you need to open your search bar, get the calculator and do the calculation?
We also make software responsible for way too much. Cross-platform is a joke. How can we expect developers to consider every platform? Obviously they will switch to some other magical solutions that promise support (and deliver overhead)
Software lacking composability also mean that if the developer doesn't provide a feature, users will most likely never have it. It is therefore encouraged to over-feature everything in case somebody somewhere want it.
I think economics has a lot to do with it. People buy apps and services, not functions and components. All the money is at the tail end of the development process when something becomes product, and that involves a lot of things that are at odds with composability.
Making software stable (including for example the web spec) would go a long way improving efficiency.
640x480 display requires about 1.2MB of memory to hold all pixels.
a 3840 x 2160 display requires 33MB of pixel data. That’s a ~28x increase. This also means that app assets like icons have increased in size and we use more of them because of larger screens we can fit more of them on the screen.
Next the storage size increased. Therefore we tend to keep data for longer even if it’s unused. More files on storage increases file system and SSD fragmentation, seek times, etc. and a lot of file systems don’t scale very well. Try creating a directory with million files or removing node.js directory with say 100,000 packages installed.
The internet connection speeds increased, so we keep more memory reserved for network buffers so the network stack can service full bandwidth if needed, and because of higher bandwidth we start serving more data in unoptimized formats like JSON because bandwidth is perceived as cheap.
Next up is bigger memory which allows a lot of slack when implementing non-performance critical pieces of code or applications.
When looked at in isolation, those things tend to often not be a big deal but when we put pieces together we get bloat. This gets compounded when applications start fighting for resources on the same machine and you get unanticipated interactions.
Pain. Just pain, on any system.
When everything is a webpage, everything incurs the overhead associated with it. Steam takes up ~250 megs. Its webhelper is chewing ~2.5 gigs right now by contrast for me.
The bloat is real.
I still program against targets with < 1 meg of RAM, but that's fairly uncommon these days professionally.
One strategy for dealing with this is to use something like k8s to run the various components in different pods. That way you can size each pod such that there are always enough resources set aside for that component, and if it starts getting too big for its britches, you know about it before the whole thing comes crashing down (because they're the britches for just that component).
Seems innocent enough, but bearing in mind that internet traffic is bursty, you end up with a situation where your pods are 90% empty 90% of the time because they're all sized for the worst case scenario. The compute you're paying for goes unused most of the time but AWS will still be billing you for 100% it.
It's a sort of cancer of the request/response world that we live in. I think we need to go back to the 90's and make a different choice about the web. pub/sub maybe. The cases where we can't tolerate a few minutes of latency are quite small--provided that the data appears out-of-date during that time instead of the app being unusable, which is how we're handling it now.
Shudders.
We are also 64 bit now. Every pointer in every app is twice as wide as twenty years ago, and we love pointers, especially in higher level languages.
The CPU usage is a lot more mysterious. We do casually do things like audio and video decoding which previously used to use a lot of CPU, and where they are not offloaded to DSPs today they can be offloaded to inevitably underused spare cores. GPUs and associated acceleration are widespread enough that the pixel hit is felt mainly on the GPU. Hitting CPU limits tends to be the result of using arbitrarily complex pointer laden data structures to represent ideas such as what passes for CSS and the DOM. Those are not what you would invent if you cared for performance, which is a major factor in why mobile native UIs feel so much faster.
I really wish x32 and arm64ilp32 would have taken off.
A lot of desktop applications are built on web frameworks that ship with their own individual instance of Chrome to run.
On Windows 95 they were C/C++ (or equivalent, Delphi, etc.) and executing on the chip.
The more abstract a software is, the less efficient. But it is also more flexible, easier to understand and modularise, and specially way cheaper and faster to develop.
Of all of the above cheaper and faster to develop is the main reason, by far. It is also safer with fewer bugs.
Software engineers are very expensive, the harder it is to develop something the longer it takes, the higher the economic risk.
To make something the "old way" takes years of work. People are not willing to wait nor pay for that, and the low level technologies will change over time so you could get trapped in a never ending rat's race.
So anyone saying that modern software is slower because it does more, better - well then I give you Visual Studio as proof that's not always true.
The flip side is that you write all of the layers of your software and control the bloat. This now becomes an expensive option.
When you are launching a program and it doesn't do something immediately, this has far more to do with networking, external layers like antiviruses pre-scanning, infected device, or app(s) hogging available resources.
Everything else is a pittance and mostly the wrong answer. When people say "browsers" they're also wrong, because a more accurate answer is "browser compositors."
The backing layers for windows currently open on your operating system are orders of magnitude larger in size than entire operating systems, multiple times, actively running in memory by comparison.
So, I think that's the real answer. Everything else seems like a pittance until you're doing some desktop computing or web browsing that requires large data structures.
The two largest and most compute expensive processes running on the system you're using to read this post are probably your OS's window server, and the browser to read HN, and that's because your browser is largely also managing its own compositing system.
That's why.
Imo it’s a fine trade off 90% of the time.
If you want a blog there is no need for fancy libraries with a fancy frameworks, probably.
I think this could be passed to the whole software / hardware situation.
Do you need a fancy desktop? Does not Gnome look better than XFCE? But you want a shiny desktop with nice animations, nice icons.
It is also required by the producent for the product to be more complicated and fragile. Now you cannot have offline software. There needs to be telemetry. Therefore there need to be internet logins. Therefore hackers are a higher threat. Why does my calculator on Xiaomi phone need permissions for gathering private data? I know maybe to select some units, but comes on!
https://idlewords.com/talks/website_obesity.htm
It weighs EIGHTY MEGABYTES, I have to ship a dozen files AND it still requires .net installed on the client machine.
However, my main job is embedded firmware. Honestly, I prefer working with such constrained systems. Kilobytes of flash and RAM, CPU so slow I have to actually consider what it does with each cycle. It's so much more fun than working with desktop software.
And had you put in a bit more time and effort you could have gotten it down to 8 MB, and with even more effort, 800KB. But you didn't because it worked and it doesn't matter and no ones care and you had more important things to do with your time. Multiply this by the entire software industry and you have your answer.
Software that ran on dos or windows 3.1 WAS fast. But it also didn't have much in the way of UI.
More interesting is just how expensive the server side is... It seems that you really need to get pretty bad point until someone cares about costs...
- Most text is now utf-8/Unicode, which requires at last 2x memory for the same text length in comparison with ASCII/ISO-8859.
- As others have said, code is 64-bit now, which multiplies the space and memory which used to be required by 32- or 16-bit apps.
- The relentless, unyelding and unforgiving pressure to produce results quickly under insane constraints discourages or forbids any kind of optimization. Now you just put your interpreted code with an Electron platform and call it an app.
No? Are you thinking of UTI-16?
Or maybe author's native language is not English. :D UTF-8 does require twice as much bytes for Cyrillic, for example.
Besides, there's a lot of other operations that happen in modern OS that makes text editing more expensive. E.g. modern applications need to account for bidirectional text, so things like "determining the correspondence between a character on screen and in memory" suddenly require table lookups to determine if the character is RTL or LTR.
Also, I concur with your point re: complex text editing.
We going back to 256 colour images, 320x240 textures in games, super low quality MP3 sounding worse than audio tapes? Going back to terminals?