News for hackers. Stuff that matters.
Re:Why modern software is slow by barbariangrunge on Friday September 30, 2022 @12:42AM (#33031040)
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.

Re:Why modern software is slow by TheOtherHobbes on Friday September 30, 2022 @08:35AM (#33034020)
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.

Re:Why modern software is slow by culi on Friday September 30, 2022 @03:43PM (#33039780)
You don't have uBlock Origin running?
Re:Why modern software is slow by rayiner on Friday September 30, 2022 @03:09PM (#33039299)
> That's the modern web.

Harsh but true.

Re:Why modern software is slow by toast0 on Friday September 30, 2022 @02:04AM (#33031511)
> 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.

Re:Why modern software is slow by hresvelgr on Friday September 30, 2022 @06:02AM (#33032959)
> 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.

Re:Why modern software is slow by ako on Friday September 30, 2022 @06:27AM (#33033118)
F1 2020 on Xbox is horrible, loading all the time. Loading once in the beginning would be ok, but it’s loading between every step. Sometimes it feels you spend more time waiting for the loading than actual racing.
Re:Why modern software is slow by LtdJorge on Saturday October 01, 2022 @12:55AM (#33044011)
That's bad design then. The Witcher 3 has no loads and rhe world is massive. As OP said, priorities.
Re:Why modern software is slow by MrPatan on Saturday October 01, 2022 @03:21AM (#33044705)
A minute seems like a long wait for software that brags about its performance
Re:Why modern software is slow by barbariangrunge on Friday September 30, 2022 @01:01PM (#33037430)
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.

Re:Why modern software is slow by dbttdft on Friday September 30, 2022 @05:50PM (#33041268)
Who is we? BR games have one map and reload it every time they start and even loading the menu takes extremely long. Then they go on top make the time between matches solid minutes to wait for people to be pointlessly loading the map. Fortnite for example (haven't played it in years but it was like that in the first 2-3 years). There's literally no excuse. Now that I got myself ranting on BR games I'll note that their quality is an order of magnitude worse (bugs, performance) than games with 5 minute rounds, while they have 30 minute rounds. Meh anyway I guess I'm attacking your random thought too hard.
Re:Why modern software is slow by tharkun__ on Friday September 30, 2022 @01:00PM (#33037407)
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.

Re:Why modern software is slow by xboxnolifes on Friday September 30, 2022 @02:46AM (#33031755)
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.
Re:Why modern software is slow by dontlaugh on Friday September 30, 2022 @05:16AM (#33032718)
If anything, it's the other way around. PS5 games often don't even have loading bars, since they assume almost-instant streaming of assets from the SSD.
Re:Why modern software is slow by Toutouxc on Saturday October 01, 2022 @08:34AM (#33046135)
Subnautica takes ages to load.
Re:Why modern software is slow by dllthomas on Saturday October 01, 2022 @02:26PM (#33048759)
Makes it scarier!
Re:Why modern software is slow by P5fRxh5kUvp2th on Friday September 30, 2022 @08:41AM (#33034062)
I like how 15 seconds is considered a decent bar.
Re:Why modern software is slow by xboxnolifes on Friday September 30, 2022 @02:29PM (#33038718)
15 seconds is my upper bar here, and it includes known, very poorly optimized, alpha games. Not once did anyone use the word decent here, you are imagining unsaid things.
Re:Why modern software is slow by norman784 on Friday September 30, 2022 @02:56AM (#33031817)
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.
Re:Why modern software is slow by meheleventyone on Friday September 30, 2022 @03:49AM (#33032162)
IO is also the bottleneck on the web, unsurprisingly.
Re:Why modern software is slow by kaba0 on Friday September 30, 2022 @04:53AM (#33032561)
I don’t know, is it? I get it, sure data has to be loaded, but the problematic part is the work being done on that data, this is what takes much more time than it should reasonably take.

Just take the example before, if twitter were server-side rendered, it would likely load in basically a blink of an eye.

The problem is code, which will later do more network calls which again have to be waited on, this is multiple round trips. Also, the fault lies probably a bit on web tech as well, html+css is just a terrible abstraction, layouting not being properly solved.

Re:Why modern software is slow by norman784 on Sunday October 02, 2022 @05:02AM (#33054252)
Maybe a partial solution will be to use qwick approach, load js on demand when needed, instead of all at once, while ideally will be use strictly the necessary js (that in some cases could be none).
Re:Why modern software is slow by meheleventyone on Friday September 30, 2022 @07:53AM (#33033661)
Network calls are IO reducing them greatly speeds up websites.
Re:Why modern software is slow by kaba0 on Friday September 30, 2022 @08:01AM (#33033731)
A network call waiting on the result of another call is still two times as long as it should/could be, no matter how efficient you make it.
Re:Why modern software is slow by meheleventyone on Friday September 30, 2022 @09:57AM (#33034882)
Optimizing your IO is indeed a good idea. Back in the day we used to order game data on CD/DVD for efficient streaming.
Re:Why modern software is slow by shakow on Friday September 30, 2022 @04:32AM (#33032440)
I don't think so.

My Internet connection saturates my PLC at 10MiB/s, my ping is under the 15ms, and Twitter still takes ~2.4s to load and render a random tweet.

Re:Why modern software is slow by nawgz on Friday September 30, 2022 @05:11AM (#33032684)
Twitter is a terrible piece of garbage website, isn't that why everyone uses it as the ultimate example of the web sucking?

Twitter wants you to download their app and sign up so they intentionally neutered their web experience. It would probably require 0.1% of their 7500 employees to spend 3 months to fix it entirely, but it's business that drives the bad tech, not the developers

I build internal apps that load collaborative an entire app with MBSE capabilities that have a time to interactivity of < 10s. Google docs takes like 7s to spin up a new doc and interact with it. I can promise you Twitter could reduce rendering some stylish HTML/CSS and a 280 character tweet to a single round trip and see maximum 0.5s browser parse & paint if they wanted to

Re:Why modern software is slow by Deukhoofd on Friday September 30, 2022 @06:53AM (#33033299)
Taking a quick look at a random tweet through the network tab, about 2/3rds of the time spent is on downloading files. Now should Twitter preload a bunch of videos from recommended tweets it shows below the tweet? Probably not. Does Twitter need megabytes of JavaScript just to show a tweet? I'd hope not. Those things do appear to be the main bottleneck however.
Re:Why modern software is slow by alrlroipsp on Friday September 30, 2022 @05:30AM (#33032808)
That's not true.
Re:Why modern software is slow by meheleventyone on Friday September 30, 2022 @07:54AM (#33033676)
I dunno it definitely seems that way. In our own product reducing IO significantly sped up time to live.
Re:Why modern software is slow by dllthomas on Saturday October 01, 2022 @02:29PM (#33048778)
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).
Re:Why modern software is slow by 7speter on Friday September 30, 2022 @02:05PM (#33038394)
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?
Re:Why modern software is slow by LtdJorge on Saturday October 01, 2022 @12:59AM (#33044026)
Yeah, but the list of things to render still has to be presented to the GPU in less than that time, from the CPU (draw call).
Re:Why modern software is slow by account42 on Thursday October 06, 2022 @11:08AM (#33109194)
Games also rely on the CPU to do simulation and feed the GPU. And Browsers also use the GPU for the actual rendering where possible.
Re:Why modern software is slow by zbrozek on Friday September 30, 2022 @07:40AM (#33033582)
I haven't noticed loading times in many years, basically since SSD replaced HDD.
Re:Why modern software is slow by Test0129 on Friday September 30, 2022 @01:57AM (#33031468)
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.
Re:Why modern software is slow by laserbeam on Friday September 30, 2022 @03:07AM (#33031887)
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.
Re:Why modern software is slow by maccard on Friday September 30, 2022 @04:13AM (#33032318)
You would be surprised, actually. This [0] shows an example of some excellent space savings. I used to work for Epic and the results we got on other projects were in this ballpark too.

[0] https://dev.epicgames.com/community/learning/tutorials/ry2D/...

Re:Why modern software is slow by laserbeam on Friday September 30, 2022 @09:04AM (#33034306)
My assumption was that you get down to 70gb packages after using tools like oodle. But hell, I may be wrong there and may be giving most AAA devs too much credit.
Re:Why modern software is slow by maccard on Friday September 30, 2022 @10:08AM (#33035022)
> But hell, I may be wrong there and may be giving most AAA devs too much credit.

I don't think this is a fair comment. Theres an enormous tradeoff to make when compressing game assets, and uncompressed game assets are _absolutely enormous_. My current project has about 30 people at the moment. The game content is ~50GB, the client itself is ~4GB but the source substance files/fbx files/photogrammetry assets are tipping on 500GB. We're a _small_ AAA game. My previous project was closer to 500GB for the game content, and the source assets were multiple TB.

Tools like Oodle are third party licenses that need to be considered. Most games are compressing but switching to better compression methods can make the differences shown. Theres still huge tradeoffs to be made though. Most GPU formats for consoles require platform specific texture formats, and some of them don't compress well (hello dxt). You might have to trade a 20% file size reduction for a 30 second increase load time. Is that worth it? Maybe.

Either way, it's not just "dumb Devs". We care, we work hard on this.

Re:Why modern software is slow by trympet on Saturday October 01, 2022 @05:32PM (#33050334)
Question: why can you not separate the different graphics tiers as optional addons? That way, I only have to download high resolution textures if my PC can actually handle them.

Edit: never mind. Saw this being discussed elsewhere in this thread.

Re:Why modern software is slow by laserbeam on Friday September 30, 2022 @05:03PM (#33040774)
> it's not just dumb devs

I may have come too rough in my comments and lost the original intent. I was hoping to defend that devs _already have_ access to good compression tools and that they already use them, and 70gb games are that big after compression is applied. That's where my assumption started.

I understand well that there are custom formats for different platforms, and that the whole reason these tools exist is not to squeeze an extra 10% smaller files, but to get fast load times while maintaining small file sizes.

> My previous project was 500gb

That wouldn't surprise me to be honest. It makes perfect sense.

Re:Why modern software is slow by shynrou on Friday September 30, 2022 @04:23AM (#33032385)
But that's kinda the point, when you are on a low to mid tier setup you now have to download 50GB of 4k textures you're never gonna see.
Re:Why modern software is slow by kllrnohj on Friday September 30, 2022 @09:21AM (#33034505)
For the steam deck valve added support for games to only include the relevant texture quality tier to save space. Hopefully that expands and rolls out more broadly, but it's also a bit awkward to specify your game quality settings before launching the game.
Re:Why modern software is slow by genocidicbunny on Friday September 30, 2022 @10:36PM (#33043259)
Both the current Xbox and PS generations support this in a way as well. The developers need to do some work to make use of the features, but they are available.
Re:Why modern software is slow by falcolas on Friday September 30, 2022 @09:17AM (#33034456)
Just get up close to a model, and you can still see the difference.

And there are YT videos that call developers out for mushy textures on every new game release.

Re:Why modern software is slow by Jensson on Friday September 30, 2022 @09:23AM (#33034513)
I looked through the generated binaries from unreal engine, and they inline sort algorithms almost everywhere in their code, so even their binaries becomes huge not just the assets. Inlining sort algorithms is in my experience a very common cause to binary bloat, and not at all helpful for performance, forcing the cpu to load that much code everywhere hurts performance. It will look good in local benchmarks though since then the CPU can keep all the code in its cache.
Re:Why modern software is slow by forgotusername6 on Friday September 30, 2022 @02:12AM (#33031555)
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.
Re:Why modern software is slow by TylerE on Friday September 30, 2022 @02:40AM (#33031710)
I had a cdrom drive in a 486 with 8mb of RAM and ~200MB of disk. I could either have a game or two installed (which at the time invariably ran in DOS) or Windows 3.1 installed. Not both.

At the time it was like… wait I just bought this fancy CD-ROM… why do I need to install 30 or 40 whole megabytes to disk to play it?

At that time it was pretty common to actually install all the game files to disk (drives were slow… I think it was 4x read speed) and then the music was encoded in the cd as additional tracks of plain CD audio.

Re:Why modern software is slow by 314 on Friday September 30, 2022 @08:59AM (#33034261)
I don't have the fastest internet connection but downloads from steam sit happily at 30MB/s so in an hour I can download 108GB of data.

The earliest cdroms that I remember were 1x drives - so it took an hour to read that 700MB. Obviously drive speeds increased tremendously over the lifespan of cdrom (did it reach 48x?), but compared to the earliest generation it is about the same.

Re:Why modern software is slow by BackBlast on Friday September 30, 2022 @11:36AM (#33036308)
The limiting factor of the CD/DVD drives was seek time, not read speed. Seeking a spot on the disk was on the order of 150ms. You basically got 5-7 read OPS. The best drive I remember stood out at 120ms seek, some would be over 200ms seek. Sometimes this was a hard number to track down. Even with a 48x drive, installation could easily still take 30+ minutes particularly if the installer wasn't optimized for sequential read off a flat file.

Sometimes you got a really bad installer, and it could take a pretty grueling 2+ hours. Some companies chose to optimize for space (thus cost..) rather than user experience.

As space got more plentiful it would sometimes be easier to copy the disk and remount it and then install.

Re:Why modern software is slow by throwaway744678 on Friday September 30, 2022 @02:37AM (#33031692)
"Patch day, no play!"
Re:Why modern software is slow by deadmutex on Friday September 30, 2022 @04:55AM (#33032572)
> 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.

Re:Why modern software is slow by JonChesterfield on Friday September 30, 2022 @05:22AM (#33032764)
Game streaming presumably needs a high bandwidth, low latency internet connection? If so that's exactly the connection that makes a 70GB download something that can happen in the background while you start playing
Re:Why modern software is slow by alrlroipsp on Friday September 30, 2022 @05:33AM (#33032820)
Or why others still love FITGIRL repacks.
Re:Why modern software is slow by tpxl on Friday September 30, 2022 @04:26AM (#33032414)
> 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.

Re:Why modern software is slow by otikik on Friday September 30, 2022 @05:57AM (#33032935)
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.

Re:Why modern software is slow by barbariangrunge on Friday September 30, 2022 @01:05PM (#33037484)
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!

Re:Why modern software is slow by generichuman on Saturday October 01, 2022 @09:40AM (#33046519)
> dictionary hashing is too slow to be ideal

Even when you use SIMD intrinsics?

For example: https://en.wikipedia.org/wiki/Intel_SHA_extensions

A repo I just found illustrating those instructions' usage: https://github.com/noloader/SHA-Intrinsics

Re:Why modern software is slow by JacobiX on Monday October 03, 2022 @07:23AM (#33065977)
Not the OP, but those extensions implements cryptographic hash functions, they are not very suitable (too slow) for hash-tables and other hash based data structures.
Re:Why modern software is slow by generichuman on Monday October 03, 2022 @08:04AM (#33066290)
4 CPU cycles is too slow? Because SHA256RNDS2 is 4 clock cycles on Zen3 CPUs. 6 clock cycles on Intel Alder Lake (12th gen).

Source is the measurements here: https://uops.info/table.html

Re:Why modern software is slow by JacobiX on Tuesday October 04, 2022 @04:49AM (#33077890)
Yes, because SHA256RNDS2 aid the implementation of the update function of SHA256. We should invoke it multiple times on the message blocks, it performs two rounds out of the 64 SHA256 rounds.
Re:Why modern software is slow by generichuman on Tuesday October 04, 2022 @06:24AM (#33078434)
> We should invoke it multiple times

That'd make SHA256RNDS2 even faster because of the throughput numbers.

I'm curious, what's the faster algorithm for hashing you use? I don't want to waste time on intrinsics and inflict complexity on my colleagues if there are alternatives I can use!

Re:Why modern software is slow by JacobiX on Tuesday October 04, 2022 @12:13PM (#33082511)
I’ll just use xxHash family, murmur hash family or even FNV. For crypto, BLAKE2 is a cryptographic hash that’s faster than SHA,MD5, etc and is at least as secure as the SHA-3.
Re:Why modern software is slow by bayindirh on Friday September 30, 2022 @06:15AM (#33033038)
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.

Re:Why modern software is slow by BackBlast on Friday September 30, 2022 @11:09AM (#33035930)
> 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.

Re:Why modern software is slow by tpxl on Friday September 30, 2022 @04:25PM (#33040312)
GC has not been an issue in Java for years. I haven't seen memory issues, except for services running in ridiculously CPU or memory starved kubernetes containers.
Re:Why modern software is slow by LtdJorge on Saturday October 01, 2022 @01:05AM (#33044045)
This could be Python or another language.
Re:Why modern software is slow by tpxl on Saturday October 01, 2022 @04:16AM (#33044949)
I know, just sharing my specific experience.

A sibling poster also comments that dictionaries are too slow. They might be in a game setting, but definitely not in a Java backend service.

Re:Why modern software is slow by rwmj on Friday September 30, 2022 @06:36AM (#33033181)
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.
Re:Why modern software is slow by leidenfrost on Friday September 30, 2022 @10:30AM (#33035355)
Backend developer here.

Most (non FAANG) sites are a mess because they're made by inexperienced developers turning everything they touch into a tangled slow mess.

The process goes like this:

- Devs ditch the legacy (often monolithic) code

- They start creating microservices fron scratch

- They don't see the need to optimize or even make readable code. It's a clean slate! the project is small, the new code is just whatever they write.

- They do that with the idea that the legacy code is "bad" and the new code is "good"

- Requirements either scale or downright change

- To the code made before, they add a "tiny" special case and patch here and there. After all, the code is "good"

Repeat

Now you have a new messy project. The dev will either quit or work in a new project. The next dev will do the same. And the new team will probably push for another replacement from scratch, so they can feel that they re creating "good" code again

Re:Why modern software is slow by Xeamek on Friday September 30, 2022 @06:13AM (#33033018)
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?

Re:Why modern software is slow by aastronaut on Friday September 30, 2022 @08:56AM (#33034227)
no, but you can definitely talk about it.

i also had a chat with a C++ dev that created a "Database"-class abstraction for our MongoDB instance and implemented methods to access each field of every documents separately - didn't care about side-effects, didn't know about ACID transactions and didn't care.

finding a good abstraction that allows for performance tuning later on is hard, no matter the language, and react devs should make use of good abstractions as well.

Re:Why modern software is slow by fyvhbhn on Friday September 30, 2022 @06:24AM (#33033105)
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
Re:Why modern software is slow by BiteCode_dev on Friday September 30, 2022 @04:09AM (#33032281)
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.

Re:Why modern software is slow by docmars on Friday September 30, 2022 @11:40AM (#33036374)
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.

Re:Why modern software is slow by LtdJorge on Saturday October 01, 2022 @01:09AM (#33044064)
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.
Re:Why modern software is slow by docmars on Saturday October 01, 2022 @02:21PM (#33048722)
Bingo! That about sums up my memories of using it every since it went CC-anything. I think CS5 was the last version I used that felt pleasantly performant -- and on older machines, no less (2013 Macbook Air w/ i7, 16GB).
Re:Why modern software is slow by bofh23 on Saturday October 01, 2022 @09:28AM (#33046451)
> 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.

Why don’t browsers mask out events during render of page regions or note their time and bounding boxes so click events reach the correct element?

Steps to reproduce this annoyance:

- visit Twitter mobile site: mobile.twitter.com in Safari on a slow iPhone (eg iPhone 6 stuck on iOS 12.X). - scroll and view tweets for a while soaking up memory. - visit a tweet - press tweet share icon - popup menu takes forever to render fully to include the Cancel button. - clicking Bookmark tweet menu item will trigger item after that, Copy Link to Tweet, when it finally loads and moves that menu item under your finger.

Re:Why modern software is slow by agumonkey on Friday September 30, 2022 @01:34AM (#33031359)
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.
Re:Why modern software is slow by EarthLaunch on Friday September 30, 2022 @02:01AM (#33031496)
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.
Re:Why modern software is slow by madeofpalk on Friday September 30, 2022 @09:19AM (#33034478)
> 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

Well now, "most games" will take longer than 3-7 seconds to load. That's fair - they're doing a lot more than websites!

Most websites also render frames in less than 17ms.

Re:Why modern software is slow by barbariangrunge on Friday September 30, 2022 @01:13PM (#33037603)
When I'm working on a web project, like my "PlotBinder" WIP, I spend way more time trying to hit 60fps than I do in my game(s). Adding little css animations or transparent overlays cut the framerate down to 40fps on my old laptop until I tinkered for a while with it and made some compromises. The way pages render on the web is finnicky to optimize for.
Re:Why modern software is slow by onion2k on Friday September 30, 2022 @02:42AM (#33031727)
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

The problem with remarks like this is that if this was really your experience of using the web you'd have installed an ad blocker years ago, and you wouldn't make that argument now. Consequently either it's easily dismiasable as hyperbole or you're a masochist who enjoys terrible websites.

There are bad websites. It isn't "most websites" though. Just like some games drop frames horribly, but not "most games".

Re:Why modern software is slow by iforgotpassword on Friday September 30, 2022 @03:01AM (#33031863)
I'm using an ad blocker, and with a cold cache, clicking a Twitter link shows a blue bird for a second, then two blue spinners (center and top) and then after 3 or 4 more seconds I can finally see a message that's a maximum of 280 characters long. News sites don't load much faster. Pages like HN are the exception, and mostly come from the tech corner. I've been on some brand's online store a few days ago and it felt like they want to drive customers away.

But fair enough, it might not actually be most websites, but enough to not be a rare experience either.

Re:Why modern software is slow by viridian on Friday September 30, 2022 @08:02AM (#33033740)
I just checked twitter's network log on a single tweet by John Carmack.

- 131 network calls

- 280 kilobytes of data received

- 4500ms total network time

Thankfully, the vast majority of other websites aren't nearly this bad, but we're trending towards twitter as an industry, not away from it.

I try to write API calls that provide broadband utility and return lightning fast by always making sure my critical path gets a fair shake for optimization, but I know there exist calls out there in react land that take my 220ms response and spend an extra 7 seconds transforming it to populate a (paginated) table on the UI.

Re:Why modern software is slow by mattgreenrocks on Friday September 30, 2022 @12:55PM (#33037331)
Amount of data transmitted seems fine...but 131 network calls? No wonder it always feels so slow to use Twitter.
Re:Why modern software is slow by BlargMcLarg on Friday September 30, 2022 @03:29AM (#33032016)
Keyword and. Ads and bloat. Adblocking doesn't get rid of all bloat.

And GP's point still stands. 17ms vs the typical 2s minimum a site takes to load is massive given the differences in what is demanded. Games actively got faster despite being more intense, websites active got slower despite relatively similar output.

Webdev's performance is shocklingly bad relative to most other subfields.

Re:Why modern software is slow by alrlroipsp on Friday September 30, 2022 @05:35AM (#33032830)
GP's point ignores the load times of a game (the time it takes to have a usable game-no progress bar), and instead compares FRAME time (17 ms to render a single frame) with the LOAD TIME of a website.

You too ignore this.

Re:Why modern software is slow by iainmerrick on Friday September 30, 2022 @03:40AM (#33032094)
Comparing the loading time of a website to the frame render time of a console game hardly seems fair.

Plenty of websites scroll at 60fps or 120fps just fine (and those that don’t definitely deserve to be criticised).

How many console games can load from scratch in only a few seconds?

Re:Why modern software is slow by maccard on Friday September 30, 2022 @04:11AM (#33032297)
This is a reasonable point, _but_ how much data do games need to load versus a website. Using Twitter as an example, when I open it I can see 4 tweets. Assuming each tweet is 1MB (for easy math), I have a 500Mb WiFi connection, I should be be able to do 100 tweets in under a second. Meanwhile most/many games are pulling in gigabytes of data in textures and audio data. Spiderman on PS5 is under 15 seconds from the home screen to being in game, playing which is about how long it takes for the Facebook mobile website to load.
Re:Why modern software is slow by isbvhodnvemrwvn on Friday September 30, 2022 @08:22AM (#33033903)
Comparing latency and throughput of local and remote assets says nothing.
Re:Why modern software is slow by emsy on Friday September 30, 2022 @04:08AM (#33032278)
Your comparing gigabytes of data to a few MB. Now that hardly seems fair.
Re:Why modern software is slow by dijit on Friday September 30, 2022 @04:56AM (#33032583)
You might know this already but in case you didn't: ad-blockers are the reason browsers are considered greedy pigs when it comes to resources.

It's no longer a universal truth that a adblocker will save you memory or CPU, ad-blockers contribute greatly to the per-tab memory cost. They also slow down page rendering greatly.

But, hey, the web is an unusable mess without them so we all use one and it's considered the cost of doing business.

Re:Why modern software is slow by aabbcc1241 on Wednesday October 12, 2022 @10:24AM (#33177409)
noscript can block most ads without much memory overhead
Re:Why modern software is slow by bradgessler on Friday September 30, 2022 @07:43PM (#33042161)
Websites can def be fast, but to your point it’s a priority problem.

This comparison I made at https://legiblenews.com/speed that got upvoted here a while back shows just that—most news websites care about ads first before their users speed experience. Only Legible News, USA Today, and Financial Times have a reasonable speed score, which is kind of depressing.

Re:Why modern software is slow by dbttdft on Friday September 30, 2022 @05:41PM (#33041166)
> I'm a game developer and game performance is better than ever.

I'm a game developer (and player) and I strongly disagree. What game can even do P95 144FPS on affordable hardware? On lowest graphics, with populated lobbies (there also can't be a that ONE map where this all goes to shit). And are we talking about AAA games or not? Because non-AAA means a minecraft knockoff cannot meet 60FPS.

Re:Why modern software is slow by KronisLV on Friday September 30, 2022 @03:08AM (#33031894)
> I'm a game developer and game performance is better than ever.

It could be, if users would have more control over the graphics settings of the games that they want to play and they were allowed to scale back further to accommodate older hardware.

For example, the Unity engine by default has a setting to allow downscaling the texture resolution that the game will use 2X, 4X and 8X, yet many games out there actually disable that. Same for some options menus not having framerate limits, dynamic render resolutions (though most engines support that functionality in one way or the other), particle density/soft particle options, options to disable SSAO/HBAO or other post processing like that, as well as enabling/disabling tessellation.

The end result is that many games that could run passably on integrated graphics or hardware from a few generations ago (e.g. GTX 650 Ti) instead struggle greatly, because the people behind the game either didn't care or didn't want to allow it to ever look "bad" in their pursuit of mostly consistent graphical quality (and thus how the game will look in the videos/screenshots out there).

The only real exception to this are e-sports titles, something like CS:GO is optimized really well for performing across a variety of hardware, while also giving the user the controls over how the game will look (and run). Games like DOOM are also a good example, but they're generally the exception, because most don't care about such technical excellence (though it's useful when you try porting the game to something like Nintendo Switch).

Most other games don't give you that ability, just because they try to always do more stuff, which isn't that different from Wirth's law (software gets slower as hardware gets faster). Of course, this is also prevalent in indie titles, many of which don't even have proper LOD setups, because engines like Unity don't automatically generate LOD models and something like Godot 3 didn't even have any sort of LOD functionality out of the box.

Engines like Unreal might make this better with Nanite, except that most people will use it for shoving more details into the games (bloating install sizes a bit), instead of as a really good LOD solution. That said, Godot 4 is also headed in the right direction and even for Godot 3 there are plugins (even though it's just like Unity, where you still need to make the models yourself), for which I actually ported the LOD plugin from GDScript to C#: https://blog.kronis.dev/articles/porting-the-godot-lod-plugi...

Re:Why modern software is slow by meheleventyone on Friday September 30, 2022 @03:58AM (#33032219)
How prevalent is a lack of graphics options really? To me it’s an expected piece of functionality in a PC build and in most games the first place I go to and turn DoF and motion blur off!
Re:Why modern software is slow by Jochim on Friday September 30, 2022 @07:37AM (#33033559)
It's extremely common in PC ports of console exclusives/console first games.

If the game is popular then someone usually comes along with a DLL that allows you to tweak at least some of the settings that weren't exposed.

Re:Why modern software is slow by zbrozek on Friday September 30, 2022 @07:54AM (#33033668)
I absolutely hate motion blur and depth of field, even if my computer is fast enough to render them.
Re:Why modern software is slow by KronisLV on Friday September 30, 2022 @10:54AM (#33035702)
You'd be surprised. Here's a Wiki that attempts to document various configuration options, tricks and utilities for many games and they have tables with what features are supported in the games that are featured on the site: https://www.pcgamingwiki.com/wiki/List_of_lists#Video

While it's not an exhaustive list, you can open any of those features and sort the table by whether the game supports the functionality itself, needs some sort of a config/tool fix/hack or does not support in any known way.

(the list is so long that you might have to view it with 500 items per page and even then jump through multiple pages, I wonder whether the dataset can have aggregate queries against it done)

Re:Why modern software is slow by thefz on Friday September 30, 2022 @03:38AM (#33032081)
> 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

I know what you want to say (and I agree), but... website rendering depends on the network mostly, 16ms latency is already the top 0.5% of fiber users and you have to add that on top of every new connection... GPU rendering happens on a bus that is thousands of times faster, and it needs to cover a minuscule distance. You can't really compare the two.

Re:Why modern software is slow by zbrozek on Friday September 30, 2022 @07:56AM (#33033687)
I have 1 ms latency to 1.1.1.1 and a 10 gbps connection - faster than a SATA SSD - and most websites are still slow.
Re:Why modern software is slow by LtdJorge on Saturday October 01, 2022 @01:13AM (#33044082)
That's the protocol and dependencies. Game assets are sequential and can be paralllelized most times.
Re:Why modern software is slow by thefz on Friday September 30, 2022 @09:02AM (#33034290)
Bandwidth =/= latency, and congrats, you are a very small percent.
Re:Why modern software is slow by zbrozek on Friday September 30, 2022 @09:06AM (#33034324)
I mention both independently. And the point is that transport is not the bottleneck.
Re:Why modern software is slow by christophilus on Friday September 30, 2022 @05:46AM (#33032885)
Agreed. Why is it taking my garden hose so long to fill my swimming pool when tsunamis can do it in a matter of milliseconds?

Differences in order of magnitude.

That said, websites and even web apps really should be faster.

Re:Why modern software is slow by alrlroipsp on Friday September 30, 2022 @05:27AM (#33032789)
> (note: games lag as well when you drag in a million dependencies you don't need)

No they don't. Your compiler will eliminate dead code.

Re:Why modern software is slow by gpderetta on Friday September 30, 2022 @06:32AM (#33033158)
It think the implication was that the dep is used but not actually needed.
Re:Why modern software is slow by alrlroipsp on Friday September 30, 2022 @06:38AM (#33033189)
That is a flattering interpretation.

Parent did write that "game lags as well when you drag in a million dependencies".

That is hard for me to interpret like you did.