Get the top HN stories in your inbox every day.
klabb3
barbariangrunge
I'm a game developer and game performance is better than ever. 144 Hz monitor? 4k? We got you covered. Even ray tracing and VR is on the way.
Most games render frames of a 3D world in less than 17ms, but most websites take 3-7 seconds to load because of all the ads and bloat, and things shift around on you for another 20 seconds after that, so when you go to tap a link you accidentally tap an ad that finally loaded under your finger. If you optimize those websites, they run super fast though, but it's quite a pain to do with the dependency bloat in modern tech stacks...
(note: games lag as well when you drag in a million dependencies you don't need)
The thing is, most sites and web apps try to solve a user problem, and if you are the only company in town that solves that problem, then performance barely matters - what matters is solving the problem. The users will put up with some pain because the problem is even more painful.
With games, it's all about the experience of interacting with the software - so performance is (hopefully, depending on your team and budget) amazing.
That, and... performance tuning is hard work, and I think most people don't know much about it. It's a fractal rabbit hole. Cache misses, garbage collection, streaming, object pooling, dealing with stale pointers, etc. Even I have a ton to learn, and no matter how much I learn, I probably still will have a lot more to learn. It's easier for many teams to hand wave it I guess as long as they aren't losing too many customers because of it.
TheOtherHobbes
Older readers will remember when you'd buy a computer magazine printed on paper and at least 80% of it was ads. Which often didn't change from month to month.
Massive slabs of wood pulp had to be printed and shipped to all to the stores that stocked them, at huge cost, just so you could manhandle one of them home.
And the content was mostly physical bloat.
That's the modern web. Except that you don't just get the ads, you get some of the machinery that serves them - at you, specifically, based on your browsing profile, which is used to decide which ads you see.
I always refuse all cookies. When I forget to do that for some reason it's obvious just how much slower the experience gets.
culi
You don't have uBlock Origin running?
rayiner
> That's the modern web.
Harsh but true.
toast0
> Most games render frames of a 3D world in less than 17ms, but most websites take 3-7 seconds to load
Most (many?) games take minutes to load. Perf is nice once they're loaded (assuming you've got sufficient hardware), but loading is a drag. Modern load times are worse than all the fiddling it took to get NES games to start.
hresvelgr
> Most (many?) games take minutes to load.
What are you loading them off? HDD? The only time I experienced a load time longer than a minute for any game was on a PS2 game that was scratched to high hell. It's possible that I'm simply interested in games that don't have long load times but I've played enough of modern AAA on console and PC to never have experienced this first hand.
barbariangrunge
It does depend on the game, but it's a good point. We do this 'cache everything at the start and avoid creation/destruction' during runtime thing that can lead to slower startup times.
After initial startup though, it depends a lot on the game itself how much loading you will wait for. I think SPAs are sort of the equivalent of zero-loading-screen games in some ways: both are trying to eliminate that loading pause.
tharkun__
That has never been different. Games push the envelope a lot. Especially if you don't have the best of everything.
Some awesome games were small. Other used a full 1.44" FDD. Some used 4 FDDs. Then the same happened with CDs. Finally only one CD needed. But there's space left over so later games made full use of it and soon there were games that needed 2 or more CDs. Lots of loading even going from one place to another. Decisions like "do I really want to go there now, I'll have to put in CD3 again". Or you bought the bigger HDD for much more $$$ and could install all 6 CDs onto that instead.
Can't run "Apache Longbow", need more RAM. But I can either buy the RAM or the game with the money I have. Damn!
What's been a blessing for me is not having the time to actually keep up with any of this time wise. Not enough time to really warrant spending money on new games and new hardware. Now I play games that are years and years old, I can get for cheap on GOG and that run fine on Intel Integrated graphics chips. Coincidentally those games usually load just fine in almost no time on modern SSDs as well and since I can't crank up the graphics full throttle, loading all that stuff into memory is relatively fast too etc.
xboxnolifes
Maybe on consoles. The only PC games I've played in the last decade that took minutes have been GTA5, Destiny 2, and heavily modded Minecraft. Most games load in under 15 seconds.
norman784
Just check how much GPU memory games are using, it take a while to load a process the assets before they are ready to use, so the bottleneck is mostly IO I believe, AMD and Nvidia were working on improving that by loading assets directly into the GPU instead of first go to the CPU+RAM and then the GPU.
dllthomas
And for the love of God, if it's a single player game let me pause while it's loading (which shouldn't interrupt the loading, but should make it start in a paused state).
7speter
Definitely correct me if I’m wrong, but games have thousands of little cores generating those frames every 17ms, but websites usually rely on a big slow cpu to direct the workflow of tiny packets from some far off network, no?
zbrozek
I haven't noticed loading times in many years, basically since SSD replaced HDD.
Test0129
I wish more game developers optimized for space. I stopped playing video games almost altogether because I'm not going to download 70 GB every time I want to play something. The size has gotten absurd.
laserbeam
Textures are big... bigbly big! And to be fair, game devs even have middleware solely dedicated to compression (such as Oodle http://www.radgametools.com/oodle.htm). I am sure that some % of that space can still be recovered, but it's definitely not significant. I'm sure you can't drop to half and maintain the ultra settings.
forgotusername6
My first computer had a 7GB hard drive. At that time we had CDs with ~700mb capacity. Now we routinely have 1TB storage and games are 70GB. As a percentage of total storage these are similar. I'm not sure how the download rate of 70GB compares to the read speed of a CD but installs took a while back in the day as well.
deadmutex
> I stopped playing video games almost altogether because I'm not going to download 70 GB
This is why some people love game streaming. Esp true if you only play a game once in a while.
tpxl
> That, and... performance tuning is hard work
Most 'performance tuning' out there is eliminating quadratic functions and putting stuff into simple dictionary caches. This should be easily teachable to any competent developer.
The problem isn't 'hard work', it's nobody cares about this.
otikik
That is not the lowest hanging fruit (where I would put trivial changes like inlining functions or switching an of-the-shelf library by a faster alternative). But it is medium-low hanging fruit.
Getting measurements that help you identify where the bottlenecks really are can take time. Often these have to be retrofitted into existing complex system, when the project is already underway.
Sometimes the only way forward is replacing the current way of doing things with a more efficient way of doing things. This requires understanding the current way well (it can be the result of many teams working together for months) as well as coming up with a new design. Both of these things take time.
Finally, there's bug hunting, where you get into rabbit holes. "There's a slowdown when we're on this particular step. You investigate for days, until you realize that the slowdown only happens when the user mouse is near a section of the screen. It turns out that there's a non-visible UI element that should be inactive but it isn't because it is a custom element instead of one provided by the UI library, and it is attempting to render a special effect but finds no graphical context, so it request for a new context once per frame." And one week of dev time has passed.
barbariangrunge
Well, for starters... dictionary hashing is too slow to be ideal. We don't swear off dictionaries, but we try to get our constant-time lookups without needing a hashing step when possible. The dictionaries can also lead to extra cache misses, since the memory often won't be compacted as you step through your data.
In most games this doesn't matter, but occasionally you have a frame time target and you need to take extra steps like that. Those extra steps can be hard work when they come up!
bayindirh
That’s just good software development practices. Game developers and scientific software developers borderline abuse the software (language, drivers, etc.) and hardware to get these performance numbers.
For example, I need to reorder a matrix and change my access pattern to it to extract more performance and reduce cache trashing by exploiting cache prefetch dynamics of a CPU.
I need to test this with every CPU generation and test whether it works as expected performance-wise.
To achieve this, I need to rewrite half of the said software.
The reason I’m not doing this is it’s still way faster than other software I’ve seen in that category, and extreme performance tuning can hurt flexibility of the code down the road.
BackBlast
> Most 'performance tuning' out there is eliminating quadratic functions and putting stuff into simple dictionary caches. This should be easily teachable to any competent developer.
That does happen, but some of the more severe performance issues I've seen are memory related. Every byte allocated has to be freed. If you lower the memory profile of your function then you reduce the overhead of running the code significantly.
I recall a web service that ground to a halt and would sit at 100% CPU, after I put it in a profiler 97% of the cycles were in the garbage collector. Dig a little deeper and I found that the caching library used was cloning the data before sending it back. Ahh, junior devs.
I rewrote a library with the same interface that did not clone the data, this was safe as the original data wasn't being changed, 15x speedup from 10 req/s to 150 req/s.
Then I dug deeper and changed which data was getting cached. Cache post-render and post-compression instead of the pre-render database calls. 150x speedup from the original or 10x from the previous point. The system went from being able to serve 10 requests/s to 1500 req/s. This change also was safer since nobody is going to ever try to alter compressed data, no such guarantees from the cached database calls.
rwmj
Isn't it another example of misaligned incentives? Your website renders on my computer, making rendering performance mostly my problem. Your website is only financially viable because it includes Google adverts and tracking, and Google again isn't paying to run those on my computer.
Xeamek
Yes, last part of performance tuning is relatively simple process as you described, but that's only because apps where performance matters are developed from the ground app with performance in mind, so entire architecture is designed in a way that supports performance.
Now try to take some React developer that has been working for years in completely different abstraction level, and help him design more performant code base.
You really think all you will talk about are cache misses?
fyvhbhn
Optimizing Websites is easy: turn on an ad locker. I was surprised how my fans of my pc went up once I turned off uBlock Origin once
BiteCode_dev
True, although even without ads nor a bloated stack, you start with network latency, code running in a VM that has to use hardware with terrible embedded gpu, accessibility requirements, seo, and so the obligation to use the dom api, the latter not being accessible throught a compiled language.
Also, the website teams is usually smaller, and have a 10th of the time to ship.
But it doesn't excuse everything, for sure. Most websites should be fast given how little they do.
docmars
Figma is an excellent example of performance being a top priority to set themselves apart, since they weren't the only player in town at the time.
We had Adobe Illustrator, XD was still in beta phases, and Sketch for macOS was showing signs of bloat and major performance hangups in any considerably realistic document. Affinity Designer was also coming into the scene with stellar performance, but had a high learning curve and wasn't well suited for interactive prototyping.
Figma swooped in and solved 3 problems:
1. Availability in the browser on any platform, where native apps can't reach (and thus 10x easier sharing of documents). 2. Incredible performance on first release through their WebGL renderer, rivaling all of the native apps listed above. 3. Stayed flexible, and yet, barebones enough to get at least 80% of a designer's needs covered initially.
Performance (and stability) were primarily what won me over to it, and I'd argue probably the same for many who switched over.
LtdJorge
Illustrator's bad performance amazes me. I don't know about newer releases, but CC 2020 is basically single-threaded for everything. It's crazy to see it wait for 8 seconds to make a png vectorial, while using 5% CPU on a 16 core 3950x.
agumonkey
The 3d world has long been a curious space to me. Even in late 90s, and early GPUs, you knew how responsive things were compared to 2d applications. It was hard to reconcile in my head.
EarthLaunch
In my opinion it's because games are art, and art is about feeling. I made a browser game, and recently optimized it heavily. Now it loads a game and huge 3D area in 2-3 seconds, faster than most mainstream websites. Like grandparent said, it is possible...and in art, how something feels is a priority.
dahfizz
> For most software, functionality, signing up for a subscription, platform availability etc are usually prioritized higher than response times and keyboard shortcuts.
This is why I love working in fintech. The engineering is paramount. Customers will not accept slow or buggy software.
I get to solve hard problems, and really build systems from the ground up. My managers understand that it is better to push back a deadline than to ship something that isn't up to standard.
ncmncm
Yes, but all in service of what amounts to automated stealing (cough) supplying liquidity.
Better than adtech, anyway. Or nukes. Lots of things, really. (I would have said weapons, last year.)
The only really defensible tech activity these days is things to help get off carbon-emitting processes. Making factories to make electrolysers. Making wind turbines better. Adapting airliners to carry liquid hydrogen in underwing nacelles. Making robots to put up solar fences on farms and pastures. Banking energy for nighttime without lithium. Making ammonia on tropical solar farms for export to high latitudes.
It's even money whether we can get it done before civilization collapses. I guess we will need plenty of liquidity...
kragen
Those are worthwhile problems to solve, but they seem well on their way to getting solved, though it's not guaranteed. Your civilization is collapsing because you're fighting each other, not because of climate change. Fighting each other is also why it's not guaranteed.
Other problems are also worthwhile to solve. I agree that zero-sum HFT and negative-sum adtech and arms races are not the most prominent ones.
sanitycheck
Well, there's education - that's net good. And I think entertainment is pretty neutral (even slightly positive) if it doesn't involve gambling or rely on player addiction. Fintech and adtech are where people bright enough to contribute positively to society go to make money instead, kind like the oil industry. All IMHO, YMMV, etc.
eru
Who would they be stealing from?
kajaktum
I think we have more than just environmental issues in this world...but sure.
tatoalo
> The engineering is paramount.
You must be lucky, not everywhere in the sector that’d be remotely close to true unfortunately…
jiggawatts
He's probably referring to the trading desk or similar teams.
Stock traders forced a lot of advances onto software. Random examples of high-perf stuff from that space include the new garbage collector in the JVM with a minimal pause time and LMAX Disruptor. Multi-threaded GUIs are relatively common in that space as well, to ensure that one hung control or window won't stop anything else.
avgcorrection
> This is why I love working in fintech.
The prototypical nerd would happily work on building a nuke capable of destroying a continent if that entailed letting him work on “hard problems”.
labster
I wouldn’t work on a continent-destroying nuke unless the project used Rust. Wouldn’t want it to be unsafe.
mr_mitm
Oh you mean the Manhattan project?
GuB-42
I don't know what you mean by "fintech" but from my experience, bank and other finance apps are usually not that great, neither are the websites. So maybe some parts of fintech are nice and clean, but the part that the end user faces, not so much.
dahfizz
I mean the actual tech than enables financial markets (fintech) - high frequency trading, matching engines, market data, order execution, etc.
xmcqdpt2
Yeah I work in finance too and it's a mixed bag. The stuff I work on right now has a very high focus on correctness and stability which is nice.
But I've also seen productionized jupyter notebooks written by just out of school data scientists and 1000 lines long SQL queries that encoded important business logic and weren't version controlled.
drdec
If I am not mistaken, fintech refers to the software/hardware surrounding trade execution on the various exchanges (stocks, bonds, commodities, etc.) where speed is of primary importance.
leidenfrost
Now I want to work in a fintech
quadcore
Sounds like places Id love. May I ask what company youre working for?
culi
This has pretty much been the exact opposite of my experience in fintech. But it's a startup so maybe that's the difference
undefined
PaulDavisThe1st
The way that game developers get their performance is more or less orthogonal to the way many other applications are expected to function.
It is impressive that they can draw so much stuff so fast, but there are actually very few objects on the screen that the user can directly interact with.
A specific example: in a DAW, you might have tens or even hundreds of thousands of MIDI notes on the screen. These look like (typically) little rectangles which are precisely the short of thing that games can draw at unbelievable speed. But in a DAW (and most design / creation applications), every single one of them is potentially the site of user interaction with some backend model object.
All those complex surfaces you see in contemporary games? Very nice. But the user cannot point at an arbitrary part of a rock wall and say "move this over a bit and make it bigger".
Consequently, the entire way that you design and implement the GUI is different, and the lessons learned in one domain do not map very easily to the other.
kragen
A user of Blender can absolutely point at an arbitrary part of a rock wall and say "move this over and make it bigger". Blender sacrifices rendering quality to make sure that interaction is reliably responsive. Cube/Sauerbraten forgoes some of the rendering optimizations provided by some other 3-D game engines to make sure you can always edit any part of the environment at any time, but it was already delivering interactive frame rates 20 years ago. And of course Minetest has very little trouble with arbitrary sets of nodes appearing and disappearing from one frame to the next, but Minetest isn't that great at performance, and its expressiveness is a bit limited compared to Cube and Blender, so maybe it's a less compelling example.
As long as it doesn't cause a glitch in playback, it's acceptable for your DAW to delay 10 milliseconds to figure out which note you clicked on. That's about 100 million instructions on one core of the obsolete laptop I'm typing this on. As you obviously know, that's plenty of time to literally iterate over your hundreds of thousands of little rectangles one by one, in a single thread, testing each one to see if it includes the click position.
But (again, as you obviously know) you don't have to do that; for example, you can divide the screen into 32×32 tiles, maybe 8192 of them, and store an array of click targets for each tile, maybe up to 2048 of them, but on average maybe 64 of them, sorted by z-index. If a click target overlaps more than one tile, you just store it in more than one tile. When you have a click, you bit-shift the mouse coordinates and combine them to index the tile array, then iterate over the click targets in the array until you find a hit. This is thousands of times faster than the stupid approach and we haven't even gotten to quadtrees.
A different stupid approach is to assign each clickable object a unique z-coordinate and just index into the z-buffer to instantly find out what the person clicked. This requires at least a 24-bit-deep z-buffer if you have potentially hundreds of thousands of MIDI notes. But that's fine these days, and it's been fine for 25 years if you were rendering the display in software.
PaulDavisThe1st
Blender, as a design/creation tool, is something I would classify as closer to a DAW than most contemporary video games. The fact that you can use it to create games isn't central.
barbariangrunge
With a modern data driven or ECS architecture, you actually can do that. There are demos out there with hundreds of interactive things on screen at one time. It's kind of amazing.
It's not like games don't have complex UIs either, where each button or field has a lot of logic to them. Many games have very simple UIs, but others get more complex than many complex web apps. Some are even multiplayer, and the server code... it's nuts how much work goes into this. The number of updates you send each second to keep players in a game in sync compared to what is needed to keep a chat app in sync is really impressive to me.
From a technical point of view, games are really cool!
LoganDark
I feel like the reason a lot of games are slow right now is because they are built out of these huge abstract "everything-doers". For example, each button can be configured in millions of different ways even though the game usually only has a few different types of buttons. It's not an optimal data structure by any means.
It's not like in the olden days where you would blit this stuff out to the screen using specialized routines that scream along as fast as the CPU will let you. Now, everything is dynamic and multipurpose and configured using properties on the object... engines like Unity get away with C# and way too much runtime reflection because it's convenient in the editor. Developers like it, it's less difficult than writing specialized routines.
avgcorrection
> It is impressive that they can draw so much stuff so fast, but there are actually very few objects on the screen that the user can directly interact with.
> > With a modern data driven or ECS architecture, you actually can do that.
At some point people forgot that there are synonyms and different ways to phrase “actually”.
HideousKojima
>All those complex surfaces you see in contemporary games? Very nice. But the user cannot point at an arbitrary part of a rock wall and say "move this over a bit and make it bigger".
The Red Faction series, building games like Minecraft and 7 Days to Die, and games like Factorio are some pretty obvious examples where you're completely and utterly wrong, so I'm not really sure why I should trust anything you said in the rest of your comment.
kragen
He's a pretty experienced and expert programmer, but I don't think he's much of a gamer.
ehnto
You might be underestimating modern games a bit I feel, but as well game engines usually have editors just as complex as a DAW. Yet both games, game engine editors, DAWs and all the examples you mentioned all run vastly more performantly than many modern simple pieces of software. Which tells us that performance is possible regardless of domain if we build properly.
PaulDavisThe1st
Yes, but the editors are (to the best of my understanding) not written using the same software techniques as the games themselves.
kevingadd
There are lots of games with destructible environments and thousands or tens of thousands of interactive objects moving around, the static world you're describing hasn't been the Only Way for quite a while. Ignoring the obvious cases like Minecraft, Red Faction and Fortnite, even games where it isn't relevant to the gameplay still implement it sometimes - for example, The Division (2016) had fully destructible walls in many locations and if you fired enough rounds into a concrete wall you could punch a big hole in it that could be seen through and fired through to attack enemies or heal allies. This sort of thing doesn't have to come at the expense of visuals either, modern rendering tech along the lines of Unreal's Lumen & Nanite can adapt to changes in the environment and handle massive dynamic crowds of people or groups of cars.
You can quite literally point at an arbitrary part of a rock wall and move it over a bit then make it bigger depending on the engine you're using. It's why Unreal Engine has got a foothold in TV production.
jayd16
What? What are you talking about? Games handle thousands of colliders and raycasts just fine. I thought you would mention that games get to use dedicated GPU hardware and apps might not be hardware accelerated but colliders? Very odd take.
maccard
Eh, the actual number of interactive items in a modern game is significantly less than thousands. Probably more like a few dozen when all is said and done.
PaulDavisThe1st
You've missed my point entirely.
Games (generally speaking) do not involve allowing the user to interact in arbitrary user-defined ways with every object represented on the screen. The interactions that do happen are part of the physics engine not the "user clicked that and dragged it to the left" engine.
Falkon1313
Games have come a long way since Space Invaders and Pac Man.
They routinely do have hundreds, or thousands, of interactive things. Especially things like RTS games. But also, even if you look at turn-based strategy games, which have a much more application-like interface. Every hexagon, terrain feature, and unit is interactive, along with a full application-like menu, statusbar, and UI system.
marginalia_nu
> Alternative hypothesis: (brace yourselves) people don't care enough. Any vendor will prioritize requirements, if performance is not in there, that CPU and memory is going to be used if in any way it helps the developers. Conversely, by looking at a system you can infer its requirements.
I think most of all, it isn't sufficiently visible. Most development is done on high powered hardware that makes slow code very difficult to distinguish from fast code, even though you can often get 10x performance improvements without sacrificing readability or development effort.
Individually it's just a millisecond wasted here and there, but all these small inefficiencies add up across the execution path.
Here's a fun benchmark to illustrate how incomplete beliefs like "compilers are smart enough to magically make this not matter" can be:
https://memex.marginalia.nu//junk/DedupTest.gmi
It's a 50x difference between the common idiomatic approach and the somewhat optimized greybeard solution, with a wide spectrum of both readability and performance in-between.
If you put zero thought toward this, your modern code will make your modern computer run as though it was a computer from the late '90s.
LoganDark
The sad thing is that a computer from the late '90s running software from the late '90s is extremely fast and snappy basically all the time. Old computers are just so much more responsive.
Honestly, what I want is for more developers to test and optimize their software for low-power machines. Say, a cheap netbook for example (like a Chromebook). I've heard that if you do that, you will be faster than basically every other piece of software on the system. And that speed will persist (multiply, even) on any more-powerful computer.
I've heard of one person who does that for their Quake-engine game/implementation (don't remember which). They get thousands of frames per second on a modern machine. I am guilty of not doing that myself, though. Might pick up a cheap netbook from eBay for around $30.
kllrnohj
> Old computers are just so much more responsive.
Because the software on them predates the explosion of GCs, JITs, and hundreds of layers of abstractions & dependencies. All those techniques that improve developer iteration & velocity came at the cost of runtime performance.
scruple
Many of the game studios near me (I live in Irvine, there's quite a few) test on older hardware as part of their QA process. I don't know what their limits are these days but I remember being impressed by Blizzard when I was visiting their campus once with a friend who worked there. It was fairly comprehensive at the time. According to him, anyway, many of the studios around here had similar practices.
nyanpasu64
Frankly I'm shocked that deduplicateTree is two orders of magnitude slower than deduplicateGreybeard, despite having asymptotically better-or-equal performance (TreeSet runtime is O(output log output), whereas sorting an array is O(input log input)). I'd say that perhaps boxing the integers is slowing the algorithm down, but deduplicateGreybeardCollections has only a <3x performance hit rather than >100x. Is the problem due to allocating large amounts of internal memory and branching heavily (binary trees as opposed to B-trees), or less predictable/vectorizable code execution than array traversal, or virtual comparison dispatch slower than `items.sort(Comparator.naturalOrder())`, or some TreeSet-specific slowdown?
marginalia_nu
Very good question. I'm away from my work station so I can't do additional profiling, but my overall experience is that TreeSet is hella slow in almost every case.
My hunch is that the extreme indirection makes mince out of data locality during traversal, since TreeSet is backed by a red black tree, so conversion to list is O(n) cache misses, whereas the sorting algorithms are reasonably well behaved from a cache perspective (Java uses a dual pivot quicksort for primitives and TimSort for objects IIRC).
nyanpasu64
Correction: Performing O(input) failed insertions into a TreeSet might be O(input log output) runtime, which is slower than what I stated above if input > output.
andrekandre
> Most development is done on high powered hardware that makes slow code very difficult to distinguish from fast code, even though you can often get 10x performance improvements without sacrificing readability or development effort.
true, but compilers are also doing a lot more, and one big driver of high-performance machines (at least for native dev) is compilation taking waaaay too much time...tjconsult
I looked at this source when you shared it and had planned to show it to a few engineers on my team. Now, sadly, the file is gone. Any chance you can put it back up?
KronisLV
> This proves (anecdotally) that performance isn't unacheivable at all, but rather deprioritized. Nobody wants slow apps but it's just that developer velocity, metrics, ads etc etc are higher priorities, and that comes with a cpu and memory cost that the vendor doesn't care about.
I saw a project that had a very clear N+1 problem in its database queries and yet nobody seemed to care, because they liked doing nested service calls, instead of writing more complicated SQL queries for fetching the data (or even using views, to abstract the complexity away from the app) and the performance was "good enough".
Then end result was that an application page that should have taken less than 1 second to load now took around 7-8 because of hundreds if not thousands of DB calls to populate a few tables. Because it was a mostly internal application, that was deemed good enough. Only when those times hit around 20-30 seconds, I was called in to help.
At that point rewriting dozens of related service calls was no longer viable (in the time frame that a fix was expected in), so I could "fix" the problem with in memory caching because about 70% of the DB calls requested the very same data, just in different nested loop iterations. Of course, this fix was subjectively bad, given the cache invalidation problems that it brought (or at least would bring in the future if the data would ever change during cache lifetime).
What's even more "fun" was the fact that the DB wasn't usable through a remote connection (say, using a VPN during COVID) because of all the calls - imagine waiting for a 1000 DB calls to complete sequentially, with the full network round trip between those. And of course, launching a local database wasn't in the plans, so me undertaking that initiative also needed days of work (versus something more convenient like MySQL/MariaDB/PostgreSQL being used, which would have made it a job for a few hours, no more; as opposed to the "enterprise" database).
In my eyes, it's all about caring about software development: either you do, or you don't. Sometimes you're paid to care, other times everyone assumes that things are "good enough" without paying attention to performance, testing, readability, documentation, discoverability etc. I'm pretty sure that as long as you're allowed to ship mediocre software, exactly that will be done.
codebolt
> In my eyes, it's all about caring about software development: either you do, or you don't.
Yes, that's the difference. I'm lucky enough to work mostly with colleagues that share a certain level of craftsmanship about the software we ship. We all care about the quality of the product, although we may not always agree on what an ideal solution should look like.
overgard
I think people care but there are no alternatives. My 3 month old Windows 11 machine with a Ryzen 5700 and an RTX 3080 regularly starts chugging on stupid things like moving a window, chrome will randomly just peg a cpu with some sort of "report" process, and visual studio locks up when the laptop awakes from sleeping. Id drop it in a second but for what? Mac sucks for game development, has the same issues with too many weird background processes, and linux distros never seem to work on laptops well, even ones designed for it (system 76 for instance). The aren't real alternatives.
mft_
(I know that this is not the ideal solution, but) I had sucesss by installing a trimmed-down 'gamer' version of Windows 11 on a similarly high-specced PC, and it's still blazingly fast nearly a year later.
(If you go this route, you've got to be careful what's been trimmeed, mind, if you want to use it for general purposes - mine doesn't have WSL and seems to have damaged printing support, which is obviously suboptimal depending on your needs.)
overgard
How does one find such an edition?
LtWorf
By people I think he meant "product managers", not users.
sershe
One of the reasons users don't care is that they have no expectations of quality. It's painful to watch non-tech people use software written by incompetent developers, like Teams. You'd literally see someone type, then Teams UI would hand. They would pause typing and patiently stare, hands on keyboard. UI would unfreeze 3 seconds later, they'd keep typing. To me this is insane, but people are used to it / have been trained to expect it and consider it normal, apparently. Just like (a somewhat more reasonable) expectation that things need to be restarted in an escalating sequence if something is not working.
If I could go back in time and make one change to the history of computing, I'd add code to every consumer-facing GUI OS that would kill-dash-nine any application blocking UI thread for more than say 200ms. And somehow make it illegal to override for any consumer software, or if I were God make it so any developer trying to override it to let their software be slow gets a brain aneurysm rendering them (even more) incapable of writing software and has to find work digging ditches.
_Algernon_
Bad alternative hypothesis. The implemented approach with recursive search is more complicated than just enumerating the files in the Sound recordings directory. A singular focus on requirements would have resulted in the easy solution that's also more efficient.
This is sheer stupidity: a more complicated, less efficient solution to a simple problem.
eru
Why is it more complicated?
They presumably wanted to recursively enumerate all the files under the Sound recordings directory?
(In any case, for the application programmer the difference between recursive enumeration of files vs only what directly in a specific directly is likely only one flag or so.)
dusted
This kind of idiocracy reminds me of the GTA json thing.. It's kind of hard to attribute these things to ignorance, but there's been a notable shift in perception among developers.. It used to always be about "tricking" the result out of the computer by applying deep understanding of both system and problem to find the fewest, most performant steps required to yield the result.
30 years ago, nobody in their right mind would have thought "du'h, I'll just recursively scan whatever directory THIS environment variable points at and then apply whatever this library does to each file in it to get some list and then extract the files I need from that list"..
Even IF you had to do such a terrible and expensive operation, you'd at least have the good sense to save your result so that you can do it more efficiently the next time..
Manuel_D
> 30 years ago, nobody in their right mind would have thought "du'h, I'll just recursively scan whatever directory THIS environment variable points at and then apply whatever this library does to each file in it to get some list and then extract the files I need from that list"..
I think plenty of people would have made the error of filtering after applying an expensive operation than before. This seems like a classic rookie mistake, not an indication of some paradigm shift in thinking. What was impressive was that no one at Rockstar thought of improving the loading performance for so long that a use decided to reverse-engineer it.
yellow_lead
I think some of these issues should be looked through a lens of incentives though as well. At my previous job, management didn't care much about performance improvements or bug fixes, they care more about delivering projects or big features. Fixing stuff like this wouldn't help you get promoted.
dusted
Absolutely, from a local perspective, decisions (or lack thereof) in regards to performance and efficiency make perfect sense, they simply shift the cost to the customer.. Pay less for development at the cost of performance which the customer will pay for with more computing capacity, electricity and time. It scales terribly though, something that may cost an additional $20000 in development cost, may cost each customer a few tens of dollars over the lifetime of the product (not including putting a price on frustration and quality of life).. But if they have a few million customers using that feature, it's terrible for society and the greater economy/ecology.
Not only due to electricity, but also the high rate of replacing perfectly working computing equipment for higher-performing, only to spend any additional capacity running increasingly crappy and demanding software.
vultour
Excuse my ignorance as I work in infrastructure, but do "pure" software engineers never have any time to do work outside of their assignments? Is it constant agile crunch to smash as many story points as possible into the current sprint?
projektfu
Eventually, this attitude develops software that takes all day to generate erroneous results and nobody really understands the code because it was all added quickly without refactoring. It's the dark side of "Do the Simplest Thing that could Possibly Work" which is probably the most misunderstood practice in XP.
At that point, every developer on the team becomes an interchangeable useless warm body and the promotion goes to the "rock star" from outside who comes in and rewrites it or surgically fixes the top performance issues.
ajyotirmay
This is the exact issue I face at my present job. Our clients have low budgets for hosting, and that means code needs to be as optimized as possible.
Sadly, the people I report to don't care enough about it. All they want is to push through the visible changes as fast as possible. And every single time these performance bugs come to bite us.
Our solution? Scale the system resources.
I'm not particularly satisfied with the work. But as an engineer I don't get to call the shots.
P5fRxh5kUvp2th
Plenty of people would have made the mistake, few would have left it there for years after performance was absymal.
terminalcommand
Alternative opinion here, 30 years ago games/software were much simpler. I assume we did not have conglomerates like Rockstar and EA who pushed their employees beyond their limits. Game industry is notoriously known for exploiting programmers.
Imagine being a SWE working 12+ hours a day 6 days a week getting no rest. I might have accidentally coded something like this so that I could go home a couple of hours earlier.
smartmic
> Alternative opinion here, 30 years ago games/software were much simpler.
Funny coincidence, yesterday I posted a link which supports exactly your statement (even the 30 years): https://news.ycombinator.com/item?id=33018669
dusted
Certainly, I see I'm coming across as bashing the devs, that's not my intention.. It is my personal experience that cost of implementation is almost always the main restraint, it sounds rational when we put it this way.. Don't spend more on implementation than is needed.. Defining what's needed is more difficult.
eru
> Game industry is notoriously known for exploiting programmers.
I'd be wary with these kinds of words.
The thing is that people seem really, really eager to work in the video games industry. (Just like people are really eager to be artists or musicians or pet vets or teachers etc.)
Approximately everyone who programs for the game industry could also land a cushy job writing boring CRUD software.
I do admit that it's tempting to show compassion for people who put up with crappy working conditions and low pay in order to work in their beloved field.
(Especially if that field sounds socially desirable like teaching.)
But unless you severely restrict entry to the beloved industry, conditions and pay will always be lousy compared to what similar skills could get you in an unglamorous field. That's just supply and demand.
> Imagine being a SWE working 12+ hours a day 6 days a week getting no rest. I might have accidentally coded something like this so that I could go home a couple of hours earlier.
In the case of the game industry, more likely so that you could work on the next ticket during the eternal death march.
terminalcommand
Isn't it exploitation to benefit from programmers'/designers' love of gaming? Labour laws are there for a reason. I believe it is a basic human right to work reasonable hours and rest.
Game development companies are making millions in profits, what stops them from hiring 2x the workforce so that each can work 8 hours a day 5 days a week instead of 12 hours x 6? The demand in the field is obvious.
I personally would prefer ethically coded games if such a category existed. I get no fun from playing a game from a company that I know exploits people. Maybe that is the reason why indie games are so popular.
edanm
Yeah, I don't buy it. I've been programming for more than 20 years, and I'm pretty sure people were making the same complaints 20 years ago that this article and you are making now.
For some software, performance is important. For others, it isn't. Some developers are good, at least at making performant software, some are worse. That's always been true and will probably always be true.
loup-vaillant
Still, software is slowing down. Anecdotal example: my phone. It used to run fine at the beginning then now a few years later everything is slow: Google maps, YouTube, Signal, the pin-code screen… I barely have installed any apps, the only thing that changed is the number of messages I have and the updates.
Perhaps we could justify it with new features at least? Perhaps my phone is slower now because the things in there are so much more useful now? Well, no. I got maybe a couple cosmetic changes, but functionality is exactly the same. My phone got slower for no benefit.
Jochim
My phone is about 6 years old. It's not noticeably slower than when I got it and it's running a lot more in the background than it used to.
joshspankit
If you’ve updated your phone’s OS since then, you now have additional services running in the background. Things like on-device face detection for photos, “suggest apps” functionality, and others.
dockd
But the weather app now has lightning animations when there's a thunderstorm! Innovation!
kaba0
Well, it may be just planned obsolescence, or a system-wide bug. Chances are it would be mostly as snappy as new, if you were to reinstall it and start anew, for example. In my opinion the problematic layer is usually the highest one, the kernel/low-level OS layer doesn’t have too many performance problems.
chaosbolt
It's not even a good vs bad dev issue most of the time, I can imagine lots of devs at Rockstar who hate working there and are under strict deadlines from managers so they just make it work while they leetcode and apply to faang for better salaries where they'll "finally" optimize things, etc.
eru
There's a big difference between latency vs throughput.
We had lots of 'free' improvements in throughput. But latency still requires careful attention.
slowmotiony
Funny enough, if you read the guidelines for Metro apps (or Modern apps, or UWP apps, or whatever the hell they are called now), Microsoft specifically says that you should offload all expensive operations to an async thread and keep the UI thread free so the interface can be quick and responsive. When I was making my first apps in university, they would routinely reject them from their app store saying the UI is not responsive enough. You'd think they actually care about efficiency and responsiveness.
But then they hardcode a whole Documents directory scan right in the UI thread in their own damn voice recorder app. Unbelievable.
joshspankit
I wonder if they only ever tested the UI when there were less than 3 files on that folder.
“Looks fast to me! Ship it.”
“Looks fast to me too! Approve it!”
andrekandre
"ship as much as possible as fast as possible" can lead to that kind of result (i've seen it over and over...)
sebazzz
They were very strict on manual reviews but when numbers became more important they let their guidelines slide.
scruple
> It used to always be about "tricking" the result out of the computer by applying deep understanding of both system and problem to find the fewest, most performant steps required to yield the result.
We didn't used to have product teams as large as engineering teams. You can still engineer software the way you want, you're just beholden to some product persons idea about deadlines now. If you can turn your little unit of work around quickly no one will bat an eye (of course, we all know that's not realistic most of the time). If you dare trying to take longer than their perception of how long it ought to take then you better be prepared to discuss the "value add" of your performance minded solution as nauseum.
nikanj
We went from ”premature optimization is evil” to ”optimization is evil”
shrimpx
An alternate view is that the state of program optimization is terrible.
kaba0
Well, optimizations need good abstractions to work with. The reason why a SQL query can run much faster than a naive for loop would is precisely due to SQL being very removed from lower-level details.
So in extension, optimization is terrible because we might be using the wrong abstraction level? E.g. it is hard to optimize a larger JS program, because if the developer specified some sort of detail it might throw out an entire class of possible optimizations.
There is actually an interesting presentation on the topic here: https://news.ycombinator.com/item?id=9396950 , which discusses among others whether a two-way communication between compiler and developer may help.
Cthulhu_
I don't think either is true. I think it's a case of "development by committee" - many different people work on a codebase, but nobody is critical enough of the whole product.
I can imagine the audio recorder is a low priority minor side project that gets handed from one guy (or team) to the next every couple of years, with the emphasis on "don't spend too much time on it".
The other issue is that performance is taken for granted; if something is slow, it's not immediately obvious.
Falkon1313
For sure. But not just "development by committee" also "development by hundreds of unrelated committees". By which of course I mean the full stack of dependencies that everything relies upon now, along with all the glue code in between that has to repeatedly transform data as it gets passed around through the system.
I've often seen some dependency module be the bottleneck, and an in-house replacement that does just what we need can perform an order of magnitude or two better than a generic 'all things for all people' module.
Also there are things that work well for dozens or hundreds of data pieces but become abysmal when you eventually scale to hundreds of thousands. But no one else has that use case, so it works fine for them. And for those that do, by then the frog is boiled and they're used to it being slow.
zweifuss
Having a list of all audio recordings always shown on the right pane is kinda an optimization (VoiceRecorder.exe). The usefulness is limited, because VoiceRecorder can't edit them, only play back and set markings.
dusted
yea, we went from being burned by trying to optimize before we knew the problem, to being burned by not optimizing because we knew the problem but didn't optimize.
dan-robertson
30 years ago, much (UNIX) system software was built out of calls to system(), ie it would have shell commands do most of the steps. Partly this is because it is hard to do everything in C and partly it is just laziness. This is partly the reason for terrible security (the IFS environment variable could be changed to change the meaning of the system() calls and trivially make a suid program do bad things).
I think you’re giving programmers of the past too much credit.
salawat
I think you're not giving them enough. They managed to have a glaring security hole to be exploited, but no one bothered to. It took the bunch of degenerates we have around today with no respect for the sanctity of someone else's machine for this type of practice to even become a problem.
You'll be amazed how many seemingly intractable technical issues aren't due to having been solved at higher layers of abstraction. Nowadays with things like clear cut ownership of post first sale ownership breaking down, we're actually getting bitten by having to try to technically solve problems, previously made tractable by the social consensus between professionals.
As a consequence, here we are with a now crappy, pathological Notepad.
dan-robertson
We must be talking about a different 1990s. It’s true that before then it was easier to get away with bad security due to few computers being networked, and it took a while for eg buffer overflows to be exploited (smashing the stack for fun and profit was November ’96). But in the first half of the decade or so there were lots of vulnerabilities found in sendmail and suchlike.
maccard
I disagree, software has always sucked. We can remember lots of the good software, and back how things used to be but the reality is this is nostalgia speaking.
A perfect example is windows 95 - wiggling the mouse causes a huge speedup in long running applications [0].
> used to always be about "tricking" the result out of the computer by applying deep understanding of both system and problem to find the fewest, most performant steps required to yield the result.
That "tricking" came with lots of issues. Massive security holes, significant app stability issues, and hugely increased developer time to implement things. I can get a hardware accelerated Sha1 hash of a buffer in one line of c++ today, and I know it will be correct.
People who do that work still exist. Computers are fast enough that it's worth not spending hours optimising for every allocation when you're displaying half a dozen strings on screen, but people like Casey Muratori, Bruce Dawson, still exist and still write code.
[0] https://retrocomputing.stackexchange.com/questions/11533/why...
dusted
> Computers are fast enough that it's worth not spending hours optimising for every allocation when you're displaying half a dozen strings on screen,
And this attitude is what gives us such gems as the one mentioned in the OP article.
joshspankit
Especially when we as modern users run multiple applications, each of them deciding optimization is not worth bothering with.
maccard
No, it's not. Not at all. I care about performance in my architecture, design, and code. However I _don't_ care about eeking out every %ge in every scenario.
The difference is caring where it matters. Bugs and mistakes happen. The measure of someone who cares and someone who is improving is how they handle it when these issues happen.
dilyevsky
I personally blame the “premature optimization is root of all evil” quote which most of the time is taken out of context but formed a lasting impact in many tech leaders’ minds
mastax
I was writing an NMEA parser today. (NMEA 0183 is a common serial GPS data protocol) My serial port reads returned an IOvec-like type which exposed limited operations. I spent probably an hour making helper functions and doing various verification and parsing operations on the IOvec type because it saved having to copy the data into a contiguous buffer. Midway through I stopped and realized that I would only need to copy when the ~50B message straddled the end of the ~64kB buffer. It takes a few nanoseconds to copy 50B. I spent an hour on an optimization that would never do anything but complicate the code. If I had just written the simple and obvious code, and spent that hour profiling the application to optimize what would actually make a difference, I'd be much better off.
That is what the quote is talking about. I don't think you can blame the quote if people are just ignoring the first word, and I'm not convinced that's actually a common thing.
userbinator
IMHO that's better called "premature complexity".
You shouldn't even need to profile to realise that if you're using a serial port for I/O, unless your hardware is something embedded and in the low-MHz, range, you'll spend most of your time waiting for I/O unless you massively overcomplicate your solution.
sicariusnoctis
New quote just dropped:
Premature complexity is the root of all evil.
IshKebab
Maybe you can't blame the quote author but the quote itself is definitely a problem now.
In my experience it is mostly used as an excuse not to think about performance at all. "The quote says we can worry about it later!"
That's why the quote needs to die.
kaba0
Or extended with the context, like “Yet we should not pass up our opportunities in that critical [hot loop]”
loup-vaillant
In other words: first, understand your data.
That's what Mike Acton says before he shakes your hand in the morning.
pxmpxm
Virtually every single performance thread on stack exchange has that one guy that says regurgitates something about premature optimizations and maintainability eg
Q "I'm working on high throughput data science thing, is branchless math better than conditional instructions here, because this thing needs to take less than a lifetime to finish"
A "You should focus on code readability, it's way more important ..yadeyadaya ... i work on python and websites"
I blame slipping standards in CS programs and the entire concept of "information science"
userbinator
SX/SO are full of such anti-intellectual cargo-culting. I've avoided them for anything but the shortest of answers.
x3n0ph3n3
> SX/SO
I've tried googling this, and I can't figure out what you're talking about.
aliqot
A good mentor told me once not to let 'perfect' be the enemy of 'good'. At the time I thought it was clever but it didn't really hit home until year 10 or 15. I did a lot of things that made no difference to the user, but to me was finesse.
happytoexplain
It's definitely a good thing to keep in mind. Perfectionism is a real danger. However, do note that there are entire categories of code quality worth keeping up that make no difference to users now. A simple example would be maintainability (whatever that means in each case).
viraptor
Tbh, most performance questions I see on SE are bad too. The necessary question here is: what's the profile of the whole thing - does this line of math even matter? The questions that are already researched to the level where the original question makes sense are extremely rare - and I do enjoy those.
ww520
Also the "developer's time is expensive" belief pushes developers to reuse layers and layers of packages and libraries whose behaviors are not well aligned with the goal of application, but hey, it's cheaper to just slap something on the existing packages and ship it. The "expensive parts" are pushed to the end users.
spaetzleesser
The funny part is that often interviewing is about knowing algorithms. But then it's frowned upon if you actually implement one.
loup-vaillant
"Don't roll your own… anything"
tuyiown
While you are right to an extent, I'd rather have someone that can check if the implementation is correct for the use case, wether it's theirs or someone's else, and settles for someone's in first when it fits.
gfaster
"Dammit, I went to school for the whole algorithm, I'm gonna implement the whole algorithm!"
jjav
> Also the "developer's time is expensive"
Agreed. I really dislike this excuse for sloppy slow code.
Yes, developer time is expensive, need to keep ROI in mind.
But if the expensive developer spents a week optimizing the function to make it 1 second faster, is that worth it? Too many people will respond "developer's time is expensive" without thinking beyond that. But of course, it depends.
If that function is being invoked millions of times per day by hundreds of thousands of people, it very quickly becomes totally worth it.
BuyMyBitcoins
Adding on to that, “QA time is expensive” too. I’ve learned from experience that trying to tweak well established repos/libraries rarely gets management’s approval because the extra time it would take to QA and regression test is considered pure loss. Better to leave it be and force the new code to work with the old stuff. That way it is at least billable.
andrekandre
> developers to reuse layers and layers of packages and libraries whose behaviors are not well aligned with the goal of application, but hey, it's cheaper to just slap something on the existing packages
and in many cases those layers and layers actually slow development long-term because of that mis-alignment and needing to untangle/manage the mess of dependencies over time...kaba0
I don’t know, should I really reimplement that graph lib in a buggier, slower way, over choosing a battle-tested one that may also contain some additional features I don’t need?
According to Brook’s famous paper, code reuse is the only way to significantly improve programmer productivity. No new language will suddenly make you 10x faster, and even that would be meaningless against all the quality code bases out there.
userbinator
It's ironic when the end users of the software are themselves developers. "Reap what you sow."
happytoexplain
Yup. There surely is such thing as over-optimized, early-optimized, over-clever, over-terse, over-engineered, over-abstracted, etc. But in terms of actual impact in the software ecosystem, the simple problem of not-good-at-programming still blows them all out of the water, combined.
It's important to be able to recognize which of the two echelons of problem-space one's codebase inhabits.
Narishma
"over-engineered" and "over-abstracted" don't belong with the others. They are extremely common in slow software, which is most software.
collyw
I would say that over engineered is not-good-at-programming. Though it's a mistake made by more experienced developers.
intelVISA
It's a great maxim but it's misapplied.
What's ironic is premature optimization is not just code, using K8s or expensive cloud solutions when a bare metal dedi will suffice. etc.
Instead it's just parroted by people who want to churn out MVP quality code in prod.
RunSet
For many readers that quote is the only part of The Art of Computer Programming they can comprehend. No wonder they bikeshed it to hell and back.
phendrenad2
Well it's the art of computer programming, not the art of shipping performant software. People just need a more rounded education.
attractivechaos
Well, modern programmers more often think "optimization is the root of all evil". I read an article that literally recommends not to optimize until the end.
ncmncm
I don't encounter mention of "the hot path" anywhere near often enough.
Defend Your Hot Path!
idiocrat
Nobody wants to do post-mature optimizations, as in never touch a running system.
No one will say thank you for fixing something, but everybody will blame you if you fail trying.
eru
As far as I can tell, it's quite common to do work to improve the performance of existing systems?
nurbl
Probably, but it is a good point: premature optimization is easy and fun because you're doing it while writing the code and it's already in your head. Optimizing a large, working, congealed codebase that you didn't write is often hard and feels risky, even with good test coverage. Very local optimizations, fine, but those requiring refactoring? Less likely to happen.
Maybe there's a golden opportunity somewhere inbetween where optimization is not premature but also not painful to do.
hbrn
Counterintuitively, software performance as a whole is not a function of hardware, it's a function of human tolerance. Apps are as slow as we humans are willing to tolerate.
As hardware gets better, we're finding ways to use it less efficiently. So if you want apps to become faster, you shouldn't be building better hardware. You should be changing human tolerance thresholds.
Which is almost impossible to pull off. Apple did this when they released the iPhone. Remember mobile apps before iOS? Mobile browsers before Safari?
MattPalmer1086
I like your take that human tolerance is the limiting factor. I'd agree that is a major constraint. The rest of it is just economics.
When I started programming, people I learned from would optimise code in assembler, use clever algorithms and write highly unreadable code that was impossible to debug. One bit of code I remember interleaved various operations so that it's access would line up with disk reads. I rewrote it to just hold the data on memory. It wasn't much faster than his disk based code in practice.
But the only reason to go to that kind of effort was the severe constraints hardware placed on software. When those are largely removed, the imperative is to write code fast that other people can still understand.
nurbl
I think part of it is the terrible software people are forced to use at work, which is bought by people who only look at feature lists and price. This stuff eats away at their expectations until they are OK with bloated stuff like discord for private use too.
AlbertCory
Speaking of Windows: the software gets slower faster than the hardware gets faster.
In around 1990, I gave my dad my old 286 machine, with Win 3.1. He never upgraded it.
About 2000, when I was accustomed to much newer software & hardware, I used his old machine. I was amazed how much faster everything was.
zenith035
I have almost 15 year old CPU with 2 GB RAM and Intel Core 2 Duo processor. It has Windows 7 installed. I recently opened it again and was amazed to see that it actually works and it is also very snappy by current standards.
nyanpasu64
My Core 2 Duo Merom laptop was sadly unbearably sluggish on Windows 7 with a mechanical drive even with indexing and background services disabled, even at browsing files and such (and merely laggy with a SSHD mechanical drive with flash cache), though I hear Penryn CPUs are faster (and perhaps desktops are faster than laptops). The computer performs much better on a non-JS-based Linux DE like MATE (as opposed to GNOME Shell and plasmashell), though taskbar window previews are black (probably it doesn't work on an anemic GMA 965). I swear Xfce on a 2-core Ivy Bridge laptop with iGPU and SATA SSD, feels just as fast as KDE on a 6-core Zen 3 desktop with non-Nvidia GPU, at file management, Konsole, Telegram/nheko chatting, and PDF reading, until you open a browser or Electron app or run a modern optimizing compiler.
Oddly, with Windows 7 on the Core 2 Duo, the taskbar would randomly stop updating (I think it stopped happening after moving the same hard drive into a newer laptop?), and I got no end of driver issues: the touchpad would stop responding on the lock screen or logged in after sleep-wake, and audio would randomly stop playing until I restarted audiodg.exe. As far as I can remember, none of these issues happen on my Ivy Bridge laptop, where I'm clinging for life onto Windows 7 (the last version with a soul) for as long as I can keep apps running... though I'm getting rather tired of Tailscale creating a new network adapter and asking for home/work/public on every reboot.
npteljes
I had the same experience with a 900 Mhz Pentium III machine, and Windows XP SP3. It was lightning, blazing fast. It geniunely felt like the reactions for my mouse clicks were faster than I could finish the clicking motion.
orionblastar
This is why some people want to still use DOS and Win 3.1 because it is faster.
I run Win95 and Win2000Pro in a virtal machine with old software and it runs faster than the most recent versions.
I put Ubuntu on a Lenovo PC and it runs faster than Windows 10 did.
ThunderSizzle
I switched to Linux Mint as my daily driver and I'm amazed by its overall performance.
There's still a couple quirks, but Windows 10 had its fair number of quirks too...
agumonkey
I had a experiences both with a very very old win95 box and an old linux 2.4 kali usb key.
The linux one was strange because my arch/systemd/ssd/i3 setup is lean, you get parallel boot, no heavy DE no bloat.. but everything felt lighter and faster on kali and I had a physical reaction saying "I don't miss anything from my current laptop, that old thing was closer to my needs".
Maybe a part of our brain that doesn't care about typography or visual effects much and prefer good old crude solid lag free tools.
desro
I recently had the pleasure of installing OS9 on a classic 2001 iMac – the "lampshade" one, though I don't think that nickname does it justice!
I was, and am, blown away by how responsive it is. Plus, the UI sound effects add to the experience in a great way. You can HEAR when you've done something "in the computer." Just a bunch of clicks and boops. It's fantastic. Makes you think about what we've just... gotten used to.
rurban
Speaking of Windows: Microsoft PMs stupidity can never be matched by declining SW development efforts, even with better HW.
Here you cannot really blame the poor developer, when the PM demands to scan all Documents, not just some relevant sound recordings. It's so obviously insane, that only PM's get away with this. Of course the dev matched our PM here, with his insane directory iters, but alone the idea must be appreciated first.
phillipcarter
PMs don't get to order devs around at Microsoft (or any sane organization). Devs can tell their PM counterparts to stuff it if they try to demand stuff. If you've worked at Microsoft, or met someone who has, you'd know this.
userbinator
That stack trace says it all --- the bloat known as COM rears its ugly head again. I also suspect there's a quadratic or even worse algorithm in there, hidden away amongst all that useless abstraction. The fundamental way of scanning for files with the Win32 API is an iterator (FindFirstFile/FindNextFile). It looks like they put some sort of array/indexing abstraction on top of that ("GetRowsAt", "FetchResultAt") which probably gets the N'th entry by stepping the iterator N times, and from there it's not hard to imagine someone doing
for(int i = 0; i < obj->GetNumItems(); i++)
doSomething(obj->GetItemAt(i));mike_hearn
I think the issue is actually the sandboxing and other stuff. WinRT StorageProvider API is known to be extremely slow and NTFS / Windows IO subsystem is itself already quite slow compared to UNIX. The issue IIRC is that StorageProvider is designed for sandboxing and the way they implemented that involves doing RPCs to other processes. So there's probably some heavy context switching involved, but it's architectural, and so the voice recorder was never fixed.
https://github.com/microsoft/WindowsAppSDK/issues/8
"The challenge here is simply that listing the StorageItems in a StorageFolder is incredibly slow and resource intensive compared to using the standard .Net/Win32 API to list the file paths. A quick test showed that in .Net it takes about 0.003ms per file, whereas with UWP StorageItems it takes about 2ms per file, which is around 700 times slower. Also, looking at the Runtime Broker, UWP uses about 70kB memory per file, which is a huge cost when loading 10,000+ files, whereas .Net uses around 0.1kB per file (that’s a very rough estimate)."
Somewhere else, someone proposes a theory that due to API mismatches/design issues in Win32 the RuntimeBroker is trying to use a design that isn't a great fit in order to try and provide certain security guarantees, and this requires pre-fetching a lot of data up front in case the app requests it. But NTFS is slow, so, all this additional traffic makes opening files via the Storage API really really slow.
The problem here isn't really "modern software", it's that Microsoft wrote a lot of new APIs over time with the intention of replacing Win32 (UWP/WinRT) but they aren't dogfooding them all that effectively, and they're using C++ for everything, so there are problems that don't get fixed for years.
mianos
This was exactly the problem with CORBA in the 90s. It made remote calls as easy to use as local calls. Once they looked the same people would make RPCs in loops like that.
Imagine the cost of a non obvious RPC call in a nested for loop? Just not funny.
mikewarot
Odds are someone who writes an app is doing it in a sterile environment, where there are only going to be a handful of test files in any folders.
If they do try it on their own system, they'll likely discount any performance hits as due to their own hording of files, and not consider the user likely to have just as many, if not more files. Thus, its not likely the programmer will notice it.
It's only if some exogenous event causes a programmer to consider run-time performance that it will be measured, and then optimized.
koyote
Another reason could also be the fact that devs usually only ever run development builds of the software.
So you end up dismissing slowness due to this ("I am sure this is faster when compiled in Release!").
I've made that mistake before until it was so slow that I decided to compile a Release build which was just as slow and found out that a regression was introduced.
Automatic performance monitoring for 'tasks'/services/computations is relatively straightforward but not quite as easy for UI interactions so these often get ignored.
notacoward
> there are only going to be a handful of test files
Bingo. This used to be a well-known benchmarking cheat, because performance on a full (or even once-full) filesystem can be very different than on a freshly made one. Almost as common as short-stroking, if you remember that. Anybody who wanted realistic results would run tests on a pre-aged filesystem. Cache warming is another example of a similar effect, and there are probably others across every area of computing. It's always really tempting to run tests in a maximally clean environment to get maximally consistent results, but that just doesn't reflect real-world usage.
bob1029
The actual capabilities of a modern AMD or Intel x86 chip are staggering compared to the zombie-like procession of application experiences they are forced to support every day.
In the 90s, we had shooters running at playable frame rates using software rasterization on a single thread. Now from this vantage point, think about the "what if you had a 1000x faster CPU" thought experiment that was posted to HN recently. Except, make it more like 100,000x faster...
If we had taken SIMD a bit further on the CPU and kept our extremely scrappy software engineering practices, I think it's possible the GPU might not have ever really emerged as a major consumer product. Recent game engine tech, such as Nanite's software rasterizer, is starting to shift ideologies back the other way now too.
klysm
> it's possible the GPU might not have ever really emerged as a major consumer product
I’m really skeptical about this take, the gains from the GPU architecture are too large to pass up on
_the_inflator
Parent poster seems to be from Intel. They argued very similar about specialized CPUs back then. "You only need one chip"
Then came 3dfx, which was a blast.
You can even call the Amiga Blitter as one of the first GPUs, at least a specialized graphics chip. Same goes for coprocessors, like a math unit in a 486DX for example.
scaredginger
Yeah, especially considering Quake 3D was the killer GPU app
mattnewport
Nanite is a software rasterizer running as a compute shader on the GPU though, it still requires the power of a GPU but takes advantage of the increased flexibility of modern GPUs.
TheAceOfHearts
Consider: if I'm a bad programmers and I care about slow software but I don't know enough to make it fast, how do I go about learning?
This is something I've considered a bit since listening to some Jonathan Blow talks. When you have loose requirements which change over time, limited time, and you're left figuring stuff out on your own it's difficult to do an outstanding job.
Nobody taught me how to write fast software. At best I learned enough to get stuff working. Usually after I've built something slow but functional I might've learned enough to write a faster version, but there's no time to do another rewrite because the features are changing.
For many developers the choice isn't between fast and slow, it's probably between slow or nothing at all.
Although I do think that big tech companies should be held to slightly higher standards.
userbinator
but I don't know enough to make it fast
I'd say that in the vast majority of cases, you don't actually need to; what you need to instead focus on is how to make it not slow, and to do so is really not that difficult. In a word, it's (total) simplicity. The less code there is in total that the CPU has to execute, the faster it'll be. Thus, don't add unnecessary abstractions/indirections unless necessary, pull in huge libraries and use a tiny fraction of their functionality, etc.
I'm of the opinion that you don't need to know about cycle counting and such to write decently efficient software. You don't need to specifically optimise if you start off with a sane and simple design.
laundermaf
> focus on is how to make it not slow
That's the same thing, worded differently. A junior programmer might focus on looping for-loops backwards "for speed" and then leave a serial `await` in the loop itself. If you don't see that that's a problem, no "focus" will help.
Too
Simplicity is good but often not the solution to make things faster.
Most obvious example. Binary search is faster than linear, at the cost of more complexity (that can often be hidden under an abstraction).
Async code is often perceived as faster than synchronous, at the cost of more complexity. In the case of TFA, loading the file list asynchronously in the background could have been a good candidate for such.
culi
> The less code there is in total that the CPU has to execute, the faster it'll be.
The more higher-level the language is, the less this is true in my experience
armchairhacker
The #1 rule of optimization is that it's only 10% or 1% of the code which matters. You only need to optimize the code which runs 1000 times a second, the code which runs 1 time every 10 seconds in a background thread can be inefficient and nobody will notice or care. You don't need to rewrite your entire app to make it run substantially faster, you only need to rewrite the hot-paths.
Another key rule is to limit the "main loop" to as little as possible: don't run big computations which don't affect what the user is focusing on. For example, web browsers will pause and unload tabs when you have several of them: this means you can have over 100 open tabs and your web browser will still run fast, because the unopened tabs are not doing anything, they are just caching the URL and (in some cases) whatever is rendered on the site. Similarly, most games try not to render or update things outside of the player's vision. You don't have to go to extremes like this, but if something doesn't affect the user's flow (e.g. an extra feature only a few people use), its performance impact should be negligible. Specifically: don't put code in your hot-path that doesn't need to be there.
Another key rule is to use well-written libraries for your algorithms. I assure you a vector-math library with 1000 stars implements vector-math operations much faster than you can, and those operations are neatly wrapped in easy-to-use functions.
When you have code in your hot-path which needs to be there, is too slow and you can't replace it with a library, then you bring out the big-O and zero-allocation techniques. And also, caching. A lot of optimization is ultimately caching, as computation is generally much more expensive than memory. Those super pretty render engines all use a ton of caching.
You can have a piece of software with tons of bloat, extra features, inefficient/redundant computations, and an Electron back-end, which is still fast (example: VSCode). Even the Linux kernel has a lot of bloat in the form of various drivers, but it does not affect the main runtime as these drivers are not loaded. Even graphically-intensive games and simulations have redundant computations and excess allocations, they are just not in the hot-path.
And last tip: don't write exponential-time algorithms. The above doesn't apply when you have an exponential-time algorithm, because even when n = 30 it will slow your computer, and when n = 75 it will run past the sun burns out.
JonChesterfield
The optimise the hot part strategy, applied repeatedly across different test cases, stamps down the spikes on the profiler until the profile is basically flat.
Sadly at that point rather more thought is needed and it seems to get a bit domain specific what needs to change next.
A corollary of this that bad architecture choices made up front, e.g. because performance was not considered, become both extremely entrenched and difficult to see on the flat flame graph.
projektfu
First, learn how to run an execution profile[1], like the author did in this article.
Second, try to find out how fast software is written in the domain. These are often architectural decisions. Is this software better written by loading the entire data into memory? Or should I process it sequentially and keep memory usage bounded? What data needs to be kept "hot"?
Third, try to figure out what parts of the OS or libraries you use have potentially unbounded waiting. You don't want that to be in any thread that has to be responsive. Either make it async or run it in another thread. This is the cause of a lot of slowness in software, where it gets tested mainly on a single machine but it is actually a distributed system, or where there is never contention for a file in testing, nor is a database row ever locked by another application.
1. https://learn.microsoft.com/en-us/visualstudio/profiling/pro...
Jtsummers
Study basic algorithms and data structures. The purpose of this is not to pass a leetcode test, those are obnoxious and those companies that conduct them should be embarrassed. The purpose is to learn how to analyze systems and their performance on two primary metrics: time and space. This isn't all there is to understanding larger systems (simplistic counting the steps of a loop is not sufficient if you're swamped by IO access times, for instance, but it's a start). But you need to be able to examine a system and understand tradeoffs. When deciding between different data structures you're often faced with a situation like: X is faster at A, but slower at B; Y is the opposite. Which do you choose? I can't tell you, you have to know your intended use-cases. Will A dominate in your application, or B? This is the kind of thinking that scales, too. A database that's better at random access reads and writes is better for some applications than one that's optimized for sequential reads but lousy at random writes, so choose the suitable option based on a reasonable expectation of your system's needs.
Study parallel programming (that is, actually having two or more threads/processes/whatevers running simultaneously). This will help you understand the limits of parallelism in speeding up programs, but also the potential for some programs. You'll learn about how to divide work across N processors, the limits of performance gains, and where you will get performance losses (critical ones: synchronization and communication).
Study concurrency so you can see how to make use of asynchronous patterns. I don't mean strictly async/await style, just how to use whatever language/OS facilities to avoid unnecessary blocking. Like, if you're making a network query it can take seconds or longer to resolve (depending on location, size of the data, remote server load, etc.). Your program shouldn't wait if it still has other things it can do (if it doesn't, then let it wait).
Use a profiler, study your real systems and see where they spend their time. What functions get called the most, what functions or syscalls consume the most time. Is there a file/resource that's constantly being used? I once sped up a program by around 60x just by realizing that the previous coder was repeatedly reading from the same file. It wasn't needed, he could have read from it once (optimal), or at least cached it in memory (though memory wasn't so plentiful then, it would've been a tight fit on a mid-00s desktop, but fine today). Apply the ideas above to analyzing it and improving it.
salawat
On parallelism:
Sufficient attentiin applied to parallelism/concurrency, is indistinguishable from management, without any of the benefits or recognition, or most other practitioners bothering to even try to to grok it.
Does that mean you shouldn't do it? No. However, there comes a point where if you breach that barrier, you will discover that the fundamental problems of today arise out of willingness to inflict pain stemming from the component actors in the Human Virtual Machine.
RedShift1
Use an old computer. Slow operations are enlarged which makes it more obvious where the problem lies. I have an old HP EliteBook 6930p with a Core 2 Duo P8700 CPU from 2008. I did put an SSD in it because Windows 10 is unusable without it.
Narishma
Using an SSD hides a lot of IO-related performance issues though. I suspect it's why Windows 10 is super slow on an HDD.
blt
> if I'm a bad programmers and I care about slow software but I don't know enough to make it fast, how do I go about learning?
Learn how to use a sampling profiler.
CamelRocketFish
Under Big O and any time you have an algorithm, see what the complexity is and if you can reduce it.
bakugo
I just tried opening the Voice Recorder on Windows 11 and was met with this: https://i.imgur.com/K8FViqO.png
I honestly have no words for this. I can't decide if I should laugh or cry.
cube00
Just wait until it starts nagging you to rate it in the Microsoft Store like the calculator does.
ridgered4
I gathered all the pieces of the Windows7 calculator and transplanted them into Windows 10 because of these stories and after seeing how slow it loaded. Speed to load is a critical feature of a PC calculator IMO.
moffkalast
That's how you get 1 star ratings.
uwagar
calculator?! jesus fucking christ.
EmilyHughes
I also don't dig the look of these apps compared to the clean GUI of Windows 2000 for example. I understand everything needs to be big and vectorized because of 4k displays, touchscreens and whatever else, but it always feels like these apps are running on Flash.
akomtu
And to tell us this you're using imgur that loads JS garbage from 10 domains in order to display a small picture.
code_duck
Maybe to one of the full pages. This link, direct to a png, only loads JS from the imgur.com domain.
FreeFull
Unless you're on a mobile phone, in which case it redirects you to the JavaScript-laden page anyway.
meep0l
What do you recommend instead?
code_duck
In a pinch, I make a post to a reddit profile and then link direct to the image. Unlike Imgur, that does link directly to the single file and not a page with html/js.
DivineBicycle
I use ImgBB, they are probably stealing your images and not deleting them if you set it to auto delete but for screenshots like this it probably doesn't matter.
DivineBicycle
I use ImgBB, they're probably stealing your images but did screenshots like this is doesn't matter.
rayiner
I’m profoundly disappointed in the direction computing has gone in the last decade. It’s like Idiocracy actually happened and we’re living in that timeline. Desktop software is trash. Apps that worked perfectly well a decade ago on far slower computers run like ass on far faster computers. The new Mac Outlook sucks CPU just sitting there doing nothing. The new Acrobat is so bad I’ve gone back to emacs for reading and annotating PDFs. To be clear, viewing PDFs in Emacs is a total hack. It involves rendering each page to a PNG file in a separate process, and having Emacs display the PNG. And it still causes the fans on my laptop to spin up less than Acrobat. And don’t even get me started on all the pdf.js/Electron stuff.
What on earth is going on in the computing industry? Did all the smart nerds get siphoned off to hedge funds and machine learning, so Microsoft and Google can only hire the dregs to write boring desktop software?
spaetzleesser
I started in the industry in the 90s. Back then most devs were actually interested in computing and motivated to learn. And management was pretty loose. In my first job they basically told "Here is the problem. Come back in a few months.". No standups, no backlog. But I sat in a nice office with two other guys where we could talk about the problems.
Nowadays I feel there are a lot of people who got into computing as a career but don't really care. And management is trying to convert software development into a micromanaged sweatshop with easily replaceable people.
strix_varius
Software development has become so ubiquitous and lucrative that it attracts folks who are heavily motivated to find some reason to exist in the org structure, regardless of whether or not that's good for the product.
The number of TPMs and co-PMs (both Product and Project varietals) has exploded. There are now "group program managers" and of course all of these no-hard-product-artifact roles have formed hierarchies, so it's now possible to be a senior technical program manager managing other technical program mangers, the real work-product of which is purely additional meetings. Sub-par software engineers now have tons of places in the org structure where they can move laterally to maintain a place in tech - usually by inserting themselves between technical groups.
Thus, the ratio of people-who-can-produce-something-in-the-product to people-who-mostly-use-email-jira-slack-and-${videoconf} has plummeted.
Any non-trivial engineering product requires organizational members, but there's administrative bloat in tech to rival academia.
I suspect that many of the egregiously bad examples here are, rather than the product of a small team of terrible engineers, actually the product of several large teams of engineers being mediated by pseudo-technical people lodged in bureaucratic seams. That's how the worst software I've personally seen has been produced.
almost_usual
> What on earth is going on in the computing industry? Did all the smart nerds get siphoned off to hedge funds and machine learning, so Microsoft and Google can only hire the dregs to write boring desktop software?
They’re grinding leetcode and getting a new job every ~1.5 years.
What happens when owning a home and starting a family near your employer is hard and gaming the interview process is easy.
8ytecoder
I was kinda shocked to learn the turnover at tech companies. Though I hardly think it’s just the Bay Area. From what I learnt the avg tenure is 4+ years nationally and about 1.5 for the likes of Google, Microsoft, Snapchat, Meta, …etc. These companies all pay well. I’ve stayed at companies for longer and for much lesser than that.
While I don’t think company loyalty is warranted, I can’t understand why there aren’t much efforts to retain them. Like matching your current employees with market rather than letting them feel like they have to job hop for a better pay.
yeuxardents
The answer to this question is not politically correct, and therefore will not be answered. We will all end up with quantum computers and software that runs slower than any software from the late 90/2000s
undefined
pen2l
It comes down to difficulties of getting a team together that can implement cross-platform software. Shipping native implementations is more than quadruple the work and cost as compared to shipping with Electron, which is reliably cross-platform and doesn't need you to gather programmers who can pull off native work, not to mention the complications in communication and management that arise after headcount of a group gets larger. There are now alternatives to Electron (Tauri/Rust and Wails/Go) and some Electron projects are starting to transfer over (like 1Password -- you can really feel difference) but it'll take time for the ecosystem to mature and become more attractive than Electron for the average project.
But right now, Electron remains a solid choice if you want to ship cross-platform desktop software without overextending on budget and time. Moreover, it's possible to make Electron apps that aren't terrible if they're optimized enough (Discord, VSCode, etc.).
PDF software is a different ball game as PDF is a behemoth of a specification. Did you know you could envelope 3d models within PDF files? Obviously a stripped down implementation (which you should use, if you don't require the fancier parts of PDF) will be snappier.
rayiner
The slowness seems to be from the UI. PDF engines, except pdf.js, are very fast. On my Mac Mini MuPDF can render 60-100 pages per second, which means for a typical PDF you don’t even have to cache more than a couple of pages in memory at a time. Emacs (pdf-tools) uses poppler, which is slower, but still can handle scrolling through 300 mb PDFs no problem. And the Acrobat engine itself is fast. Prior to Acrobat DC it ran very smoothly on old hardware.
PDF has a lot of features, but it’s not complicated. If your PDF doesn’t contain a 3D model, that’s just some code that takes up room in the library but probably doesn’t even get paged in. A PDF is just a command stream, and the commands for drawing text are straightforward: https://www.oreilly.com/library/view/developing-with-pdf/978...
As to cross platform software, what about Qt, or GTK, or WxWidgets? There isn’t a single decent Electron app. Even VSCode uses CPU sitting there doing nothing. It’s a freaking text editor, what’s happening in the background?!
pen2l
> PDF has a lot of features, but it’s not complicated.
I'm not sure about, Acrobat reader in particular is very complicated, I'll rehash a famous old reddit comment --
Acrobat doesn't just read PDFs, it's a mail server, document lifecycle management system, DRM client, full-fledged document tracking system, it can have forms, it can gather statistics for your docs when you share them, it has audio and video playback. The manual is a couple thousand pages. Adobe's proposition to businesses is "You want a complete content tracking system? Wanna be able to effortlessly conduct surveys? Get next-level telemetry data from your users? Have we got the thing for you... the best part is all of your clients already have it installed!"
So good on you for ditching Adobe and not enabling this bull, SumatraPDF/emac's pdf-tools is perfect.
Regarding native GUI toolkits, they work but they're more work than Electron to deal with. Secondly, the big thing that us nerds keep failing to recognize is that software needs to be easy to use for grandmas and grandpas, part of that means having consistency in UI for users across the board from one system to the other. See how Zoom is nearly identical when using on iPad or Windows 7 or even Linux? Couldn't pull that off with GTK. I think with Qt you can modify your widgets quite a bit but you still don't have control over the minutiae of UI like you do with Electron.
Don't get me wrong it is still the wrong choice many times; the abomination that is MS Teams and Spotify is a flagrant violation of good taste and should be set on fire and nuked out of the fucking orbit, it is a heinous crime especially for big companies with the means to arrange large teams to build and deploy apps made with non-WebView-based frameworks, but for small shops I don't see any issue with Electron's use. VSCode launches instantaneously on my M2 Macbook Air. Zoom works flawlessly, along with a host of other Electron-based apps. I don't care too much if it's using some CPU here and there if I can't discern any slowness. Anyway, apps made with Tauri are much better in terms of CPU and memory usage, 1Password moved from Electron and Tauri and I'm certain more will follow and the next wave of desktop apps will surely be speedier now that Electron's slowness has become a bit of a meme.
kaba0
Did you just list the advantages of web tech in the first half and then called PDF spec a behemoth? :D
Actually, PDF is not that bad at all. Sure, it has gotten some additions over the years, but even those are not actually too foreign to the original design.
pen2l
At least webtech has some excuse for being a gargantuan tarantula and having its legs everywhere, PDF software is supposed to be basic document software but overreaches.
anonymous_sorry
End users don't pay for desktop software any more. I wonder if this is part of the answer.
nyanpasu64
Have you tried using Okular? It's a pretty serviceable PDF reader on Linux, and now has a Windows port as well.
Okular also comes with a per-page cropping mode, though it tends to cause issues when scrolling between pages. I prefer to use pdf-crop-margins (and on encrypted PDFs, qpdf --decrypt so pdf-crop-margins can read them) to generate a pre-cropped PDF that works on any reader, but keep the original PDF around for when I like it better.
Another trick is that on large 32+ inch screens, you can use Firefox's pdf.js in horizontal scrolling view to hold 2-3 pages on-screen simultaneously and cross-reference them easily, then switch to the hand tool for easy continuous scrolling.
rayiner
I was more making a comparison between PDF apps with newfangled UIs (Acrobat, anything based on Electron or PDF.js), and a complete hack in Emacs that somehow still works better. There are, of course, decent PDF apps built on 1980s/1990s UI technology. Sumatra (Win32) and Preview (directly descended from the Preview app in NeXT Step).
makeitdouble
Isn't it the natural progression of most technical devices ?
For instance looking at coffee machines, the general direction was:
- no machine, or decent but not so advanced machines - super basic machines, or advanced but finicky machines - crappy capsule machines, or super advanced finicky machines
Depending on how you look at it, there is a path from "advanced but finicky machines" to "crappy capsule machines". Personally I think things still improved, even as the low end is still crappier than the middle/high end from decades ago.
undefined
nyanpasu64
A very slow scan of the Documents folder, by RuntimeBroker.exe which manages the Store app sandbox, reminds me of Android apps waiting up to 10 seconds for the Android system file picker to list the contents of my Downloads folder since apps (kinda) aren't allowed to browse your files directly.
Get the top HN stories in your inbox every day.
Alternative hypothesis: (brace yourselves) people don't care enough. Any vendor will prioritize requirements, if performance is not in there, that CPU and memory is going to be used if in any way it helps the developers. Conversely, by looking at a system you can infer its requirements.
For commercial airplanes it may be safety first, ticket price second (passenger capacity, fuel efficiency) and speed third. For most software, functionality, signing up for a subscription, platform availability etc are usually prioritized higher than response times and keyboard shortcuts.
Game devs worry a lot about latency and frame rates and professional software care a lot about keyboard shortcuts. This proves (anecdotally) that performance isn't unacheivable at all, but rather deprioritized. Nobody wants slow apps but it's just that developer velocity, metrics, ads etc etc are higher priorities, and that comes with a cpu and memory cost that the vendor doesn't care about.