News for hackers. Stuff that matters.
Re:Modern software performance is firmly in its “beyond paro... by saagarjha on Wednesday March 29, 2023 @12:08AM (#35352377)
Most engineers are unfamiliar with how to improve their software’s performance, unfortunately. This has nothing to do with any individual technology stack or product, really, it’s more of a general idea of how you can figure out how things are slow and make them faster. It’s just not something most people ever learn. The way performance blog posts are written on the internet doesn’t really help, either, because most of them are tired arguments about specific things being slow or one-offs that don’t apply elsewhere. Learning how to use a profiler, or have an intuitive sense for how long something “should” take, is critical here, and it takes time to develop.

For example, speaking completely independently from the problem here but putting on my performance hat, I would expect that if we take all things as a given (“no major architectural changes allowed”) Teams should not take 10 seconds to start up to show UI. We know that the tech stack they’re using isn’t fundamentally that bad. This suggests that there is probably a handful of things they are doing that are low-hanging fruit but haven’t been identified yet. Once they find those and bring down the time to something more reasonable like a second things will get much harder for them to fix.

Re:Modern software performance is firmly in its “beyond paro... by brundolf on Wednesday March 29, 2023 @12:14AM (#35352443)
Teams is one of Microsoft's headlining apps right now, and it's been such a PR nightmare that they're explicitly advertising a major performance improvement, complete with a slick video (when was the last time you saw an everyday app do that?)

So I highly doubt the people driving this initiative are just "unfamiliar with how to improve their software's performance". Something else is going on here: maybe they were saddled with something so bad it could only be fixed so much, maybe there's some technical hurdle we're just not appreciating, maybe it's an organizational problem (this is my guess). But Slack has a similar problem, so I doubt it's the first possibility (the 1.0 of the app just happened to be botched). There's something going on here

Here's my wild uninformed guess: Teams has lots of features/integrations, and they're constantly expanding because it's in the limelight right now, so they've got too many engineers on it working on different features at the same time and not talking to each other enough. The system is now too sprawling to be considered (or optimized) as a whole, which means there's tons of redundancy and toes-stepping going on. Shipping the org chart, etc.

(Ask me where this vivid picture came from)

Re:Modern software performance is firmly in its “beyond paro... by saagarjha on Wednesday March 29, 2023 @12:23AM (#35352529)
I suspect (obvious disclaimer, this is speculation, but I've seen this happen many times elsewhere) is that the Teams team (heh) was asked to improve their performance for this sprint and they poked around a little bit to find some of the easiest wins, which is what we're seeing here. At most places, presenting that you've improved launch speed by over 2x is a major success, and their PR team decided it was worth advertising. The people who worked on this should be proud of the work they did but there is still clearly a long way to go to improve the app's performance.
Re:Modern software performance is firmly in its “beyond paro... by seadan83 on Wednesday March 29, 2023 @03:24PM (#35362015)
This rework has been in the works for some time, they released a whole blog post explaining some changes (eg, switched from angular to react, and more): https://www.microsoft.com/en-us/microsoft-365/blog/2023/03/2...
Re:Modern software performance is firmly in its “beyond paro... by 908B64B197 on Wednesday March 29, 2023 @10:40AM (#35357969)
> Something else is going on here: maybe they were saddled with something so bad it could only be fixed so much, maybe there's some technical hurdle we're just not appreciating

They started with Electron, and are now moving to WebView2. When the project started Edge was still not Chromium based (it was the IE fork) so they couldn't even use that.

Re:Modern software performance is firmly in its “beyond paro... by jesse__ on Wednesday March 29, 2023 @01:04AM (#35352861)
One thing that id did to hit their target framerate of 60fps on (IIRC) Quake 3 is have a policy that boiled down to:

"We always run at 60 fps, because if we finish the game, then try to optimize our way to 60, we'll never hit it."

>> This suggests that there is probably a handful of things they are doing that are low-hanging fruit ...

The Quake annecdote suggests the opposite. If I had to guess (from personal experience with web development), it's probably a million-billion little things that, when added up, make your whole project a slow, gelatinous pile.

That's not to say there's not also low-hanging fruit that might make switching between conversations take less than a second, but .. it should take .. like .. a short amount of time, like 16.6ms, including the network trip.

Re:Modern software performance is firmly in its “beyond paro... by seba_dos1 on Wednesday March 29, 2023 @08:03AM (#35355918)
Let's be realistic, it would be pretty hard to hit 16.6ms. Not impossible, but very complex with little benefit (at this point you need to care about such low-level things as the way you schedule frames to be displayed by system compositor, for example - and even how the compositor itself is doing its work too!). Something like 200ms, however, should be perfectly achievable with little effort and just as snappy in practice for this kind of app :)

(note that a game running at 60 FPS does not mean that you get 16.6ms mouse-to-screen latency at all)

Re:Modern software performance is firmly in its “beyond paro... by amoss on Wednesday March 29, 2023 @11:13AM (#35358451)
Why?

In 16.6ms a modern processor will execute about 128 million instructions. We need to locate about a screenful of text and/or cat pictures. We need to perform layout and then render it. The amount of work being done is not very much, or very difficult. The resources available are luxurious.

What part of the problem is it that makes it an unrealistic target?

Re:Modern software performance is firmly in its “beyond paro... by seba_dos1 on Wednesday March 29, 2023 @11:32AM (#35358716)
Because most screens are running at 16.6ms refresh rate, composition is vsynced and windows are double-buffered at multiple stages in the whole display pipeline to avoid tearing and other kinds of artifacts. You're naturally going to have 2-3 frames of latency unless you try really hard to avoid it with advanced frame scheduling that won't be worth employing for an office application. You usually optimize application rendering for smoothness (no frame drops, no artifacts, consistent 60 FPS) rather than latency, and doing one usually hurts the other.
Re:Modern software performance is firmly in its “beyond paro... by amoss on Wednesday March 29, 2023 @01:03PM (#35360061)
Ah, ok so you are considering the latency rather than the throughput. I was thinking that being able to perform the update within 16.6ms should not be too hard - there is a sibling comment about SSD latency but the working set should fit in RAM.

Sure, so there will be latency, maybe 4-5 frames with input lag. But this is normally bearable in a game so I'm guessing that it would work fine for an office app. It would be difficult to remove, but 80ms response time from an application that can always hit its 16.6ms deadline should be workable.

Re:Modern software performance is firmly in its “beyond paro... by seba_dos1 on Wednesday March 29, 2023 @01:25PM (#35360367)
We're talking about switching between conversations, latency is all that matters :)
Re:Modern software performance is firmly in its “beyond paro... by ehaliewicz2 on Wednesday March 29, 2023 @06:29PM (#35364763)
This seems like needless pedantry. The computer should be able to easily do it in 16ms or less. Add on the 16ms or whatever of extra latency for the mouse and display, and it's fine.
Re:Modern software performance is firmly in its “beyond paro... by mike_hearn on Wednesday March 29, 2023 @11:33AM (#35358740)
Disk IO. Even with SSDs it's not that fast.
Re:Modern software performance is firmly in its “beyond paro... by jesse__ on Wednesday March 29, 2023 @11:35AM (#35358766)
>> it would be pretty hard to hit 16.6ms

Hard disagree. Sorry, but rant inc ...

If we can't hit 60fps with a chat app, one of the simplest applications imaginable by man, what the hell can we hit 60 with? It's drawing a couple thousand triangles (maybe) with a couple hundred textures (I guess). Game engines fart a couple thousand triangles when they're done drawing 50x+ that. Oh, and they do about a gazillion other operations .. at 60fps+

The slow part of switching between conversations is fetching the data which, on a fiber connection in a city, is < 5ms round trip. Hell, I live in the boonies in Canada and my round trip to Seattle is only like 20ms. You could also cache the first 20 messages to every conversation (disk space is cheap) to avoid the network.

As for the notion that "you need to care about such low-level things ...", yes, you do. To write fast software you just deal with it and move on.

Re:Modern software performance is firmly in its “beyond paro... by seba_dos1 on Wednesday March 29, 2023 @11:39AM (#35358810)
Being able to hit 60fps is just a single prerequisite for low latency, but it's far from enough. The application may be able to render itself consistently even in 2ms just fine, but effect of your action won't appear on the screen until much later unless you make your whole stack (including the OS) surprisingly complex (which is worth doing in case of competitive video games running in fullscreen, not for applications).

Seems like you're simply not aware of complexities of the display path. Please make a simple windowed OpenGL application displaying a single triangle in thousands FPS that changes color when you press a key and measure its latency, you may be surprised ;)

Re:Modern software performance is firmly in its “beyond paro... by jesse__ on Wednesday March 29, 2023 @12:31PM (#35359602)
Okay, I see what you're getting at now, and yes, there are a few frames of latency between the time the app is done drawing and the time pixels are in front of your eyeballs, but that is _completely_ missing my point, and the point of the tweet.

If we're splitting hairs about how we define how long an application takes to update, we've already won.

In reality, we're talking about an app that should take ~0.01s to perform an operation (update a rectangular region with text), that's taking 1.0s instead. And that's THE OPTIMIZED VERSION. In the real world, we've already lost, which is what Casey was pointing out in his tweet.

Re:Modern software performance is firmly in its “beyond paro... by seba_dos1 on Wednesday March 29, 2023 @12:41PM (#35359754)
The only measure the user cares about when it comes to snappiness is input-to-display latency, and the whole point of my comment was to be realistic about it. A chat app won't hit 16.6ms latency, but it doesn't have to. 100-200ms is realistic and perfectly fine, and if you don't manage to hit it, something is seriously wrong with your application.

And yes, of course, something is seriously wrong with a lot of applications these days, otherwise we wouldn't be having this conversation at all.

Re:Modern software performance is firmly in its “beyond paro... by skavi on Wednesday March 29, 2023 @02:33PM (#35361305)
I’ve heard Safari doesn’t allow performance regressions. And they currently have the fastest browser.
Re:Modern software performance is firmly in its “beyond paro... by illiarian on Wednesday March 29, 2023 @08:04PM (#35365793)
From the horse's mouth: https://twitter.com/rniwa_dev/status/1578097561222537216 (a mini thread, only quoting top tweet)

"It's a bit of understatement to say @WebKit project cares about performance or efficiency of the software. We're quite obsessed with it, and we throw a lot of engineering resources at it, not to regress, and to improve upon."

Re:Modern software performance is firmly in its “beyond paro... by Jtsummers on Wednesday March 29, 2023 @12:12AM (#35352425)
> Most engineers are unfamiliar with how to improve their software’s performance, unfortunately.

Then they aren't "engineers" yet. Engineers can figure out how to use a profiler and how to improve performance of their software. Calling themselves "engineers" while being unable to do so should be a signal to everyone in their circle that they're incompetent hacks. They should at least be honest and give themselves an appropriate title, like "apprentice" or "intern" or "novice" or "student".

Re:Modern software performance is firmly in its “beyond paro... by saagarjha on Wednesday March 29, 2023 @12:29AM (#35352583)
Heinlein has a quote in one of his works that goes like this:

> A human being should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyse a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly.

I think all software engineers should be taught to be able to handle a profiler, poke around in a debugger, write a short correctness proof, and consider how an attacker might abuse the APIs they expose. I know a lot of people who are working to make this dream a reality right now. Until this happens, though, gatekeeping the definition of an engineer is inappropriate and does nothing to help improve the situation, because people are generally resistant to learning these things if you call them "incompetent hacks".

Re:Modern software performance is firmly in its “beyond paro... by Jtsummers on Wednesday March 29, 2023 @12:44AM (#35352712)
software profiler : software engineer :: ruler : <pretty much every other> engineer

Profilers are simple tools that every software engineer should be familiar with. They are literally just a way to measure performance of a software system. The basic ones do this by tracking time, or counting the number of times a block of code are entered. People have recreated them a million times (probably more) because they're so damned easy to create.

I'll take my hit for this one: If someone were to come up to me and say, "I'm an engineer, but I don't know how to measure the software I make." I'd think they were a hack, yes. If they instead were honest and said, "I'm a student studying to become an engineer ..." or "I'm a novice trying to become better..." then at least they're honest individuals and not liars or hacks. If that's gatekeeping, then so be it. They are not engineers yet if they can't use the software equivalent of a ruler.

Re:Modern software performance is firmly in its “beyond paro... by 908B64B197 on Wednesday March 29, 2023 @07:25PM (#35365379)
> If that's gatekeeping, then so be it. They are not engineers yet if they can't use the software equivalent of a ruler.

It's not gatekeeping.

Traditional engineering fields have somewhat standardized expectations around what a new grad should know. Same as law or Medicine/Nursing. When someone calls himself a Software Engineer, I too have an expectation of what they should know.

It's part of what made the scene where Katherine Johnson explains Euler's method as a little known math trick to a group of bewildered NASA engineers so funny. Everyone in that room would have been familiar with that concept as it's the first numerical method encountered in a differential equation class [0].

I would love some sort of standardized curriculum for Software Engineering. No exam, just a list of pre-requisite and concepts.

[0] The real work she did would have probably required a separate two hour documentary so I understand the filmmaker's decision here.

Re:Modern software performance is firmly in its “beyond paro... by saagarjha on Friday March 31, 2023 @12:04PM (#35389147)
Are you working on making this? If not, why are you looking down on people for not living up to a standard that does not exist yet?
Re:Modern software performance is firmly in its “beyond paro... by lapcat on Wednesday March 29, 2023 @09:27AM (#35356986)
> Heinlein has a quote in one of his works that goes like this:

>> A human being should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyse a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly.

“For as soon as the distribution of labour comes into being, each man has a particular, exclusive sphere of activity, which is forced upon him and from which he cannot escape. He is a hunter, a fisherman, a herdsman, or a critical critic, and must remain so if he does not want to lose his means of livelihood; while in communist society, where nobody has one exclusive sphere of activity but each can become accomplished in any branch he wishes, society regulates the general production and thus makes it possible for me to do one thing today and another tomorrow, to hunt in the morning, fish in the afternoon, rear cattle in the evening, criticise after dinner, just as I have a mind, without ever becoming hunter, fisherman, herdsman or critic.” - Karl Marx

Re:Modern software performance is firmly in its “beyond paro... by saagarjha on Friday March 31, 2023 @12:09PM (#35389238)
Guess we know where the inspiration came from, heh
Re:Modern software performance is firmly in its “beyond paro... by toss1 on Wednesday March 29, 2023 @09:33AM (#35357057)
>>because people are generally resistant to learning these things if you call them "incompetent hacks".

Therefore we should hide the truth?

Sorry, it doesn't matter what field you are in, if you can only build stuff but you lack at least a solid familiarity with the tools and techniques of your trade that enable you to improve the performance of your product/service, you are simply not yet fully competent.

Period. Full stop.

If you can write code that compiles and runs, and even do it at large scale, that's nice. But have some humility and recognize that while this is definitely far better than nothing, it is NOT the end, it is merely the beginning, and you are not yet anything special.

Same applies for any field. It is really great go from nothing to being able to build functioning stuff, but it is only the beginning.

Sadly, many people get one year of experience 20 times over, and then get all full of themselves thinking this is the same as 20 years of of digging deep into the technology. Saving them the hard assessment does no one any good.

Re:Modern software performance is firmly in its “beyond paro... by saagarjha on Friday March 31, 2023 @12:10PM (#35389255)
They're not incompetent hacks. That's the truth.
Re:Modern software performance is firmly in its “beyond paro... by knighthack on Wednesday March 29, 2023 @10:57AM (#35358204)
These are engineers, not normal people.

It's fair to expect a professional cook to be able to cook well. Guarding their feelings for their incompetent cooking serves no purpose, since they become useless to their firm, and customers will want to avoid what they cook.

The same expectation should hold for professional engineers. If they are incompetent hacks, tell them they are. Guarding their feelings above describing reality to them only lets their illusion of competence to continue, and is what causes poor software, more incompetent incompetent engineers, and troubled users.

Re:Modern software performance is firmly in its “beyond paro... by saagarjha on Friday March 31, 2023 @12:06PM (#35389184)
They are not incompetent hacks. Stop calling them that! They were failed by a system that did not tell that they should learn how to do these things, and are struggling to catch up. You can point out areas of improvement without being mean.
Re:Modern software performance is firmly in its “beyond paro... by knighthack on Monday April 03, 2023 @01:11AM (#35418794)
Businesses and the commercial world have no obligation to anyone, much less to incompetent people.

It is the incompetent hacks who have failed themselves, by not being aware, and by not adapting and improving accordingly. The 'system' did not fail them.

The real world is not a college or school or university, where things are fed to you on your time. Employees must learn on their own time and other people's time. If they cannot keep up, then let's be real: they are incompetent.

By blaming the system, you take away the accountability and responsibility of incompetent people. If many better programmers were able to catch up, why can't they? We can't make excuses for incompetence.

Re:Modern software performance is firmly in its “beyond paro... by saagarjha on Monday April 03, 2023 @09:26AM (#35423151)
I work in the commercial world. It is critical that we help our engineers learn the skills they need to be successful, because we spend a lot of money on them. We value our employees because of their capability to learn things when necessary.
Re:Modern software performance is firmly in its “beyond paro... by 908B64B197 on Wednesday March 29, 2023 @07:28PM (#35365403)
> I know a lot of people who are working to make this dream a reality right now.

What are they doing?

> Until this happens, though, gatekeeping the definition of an engineer is inappropriate and does nothing to help improve the situation, because people are generally resistant to learning these things if you call them "incompetent hacks".

So they should instead be coddled?

How does it not help to simply say: Here's something everyone from a decent engineering program should know on graduation?

Re:Modern software performance is firmly in its “beyond paro... by saagarjha on Friday March 31, 2023 @12:04PM (#35389132)
Writing documentation and working with engineers to backfill these skills, rather than being grumpy about it on the internet ;)

> How does it not help to simply say: Here's something everyone from a decent engineering program should know on graduation?

This does.

> So they should instead be coddled?

This doesn't. I'll let you figure out what the difference is between these two.

Re:Modern software performance is firmly in its “beyond paro... by dogen on Wednesday March 29, 2023 @11:33PM (#35367582)
absolutely pathetic. i'm a bad hobbyist programmer and i learned 6502 assembly in order to do the kind of effects i want in my 8-bit demos and engineers with degrees aren't even willing to go a fraction that far?
Re:Modern software performance is firmly in its “beyond paro... by slfnhilljohn on Wednesday March 29, 2023 @12:35AM (#35352640)
Actually we know for a fact that the tech stack they are using is fundamentally bad.
Re:Modern software performance is firmly in its “beyond paro... by saagarjha on Wednesday March 29, 2023 @12:40AM (#35352678)
That's not what I said. I do not wish to have an "Electron sucks" argument here, but I am open to a "actually Electron apps should take 10 seconds to start up" viewpoint if you wish to share.
Re:Modern software performance is firmly in its “beyond paro... by JohnFen on Wednesday March 29, 2023 @01:44PM (#35360629)
> It’s just not something most people ever learn.

They don't?? If that's true, it's a pretty sad commentary on software engineering these days.