News for hackers. Stuff that matters.
Re:Modern software performance is firmly in its “beyond paro... by brundolf on Tuesday March 28, 2023 @11:55PM (#35352246)
I'd be so curious to get a window into the profiling, back-room discussions, etc. that happens at orgs like Slack and Teams. What's going on here? What all did Teams just improve? What are the barriers they're still running into?

I don't want to be that person who says "mrahhh a new CS graduate could have built Teams in 2002 and it would have been faster!" But I'm also like, whatever is stopping it from being faster, I can't imagine what that is from where I'm sitting!

I've built high-complexity, high-performance web apps, and while there are challenges (the smooth infinite scroll without any placeholders in the video was actually pretty slick), there are other things like 900ms to switch tabs and 9.1s to boot that are just really hard to believe (and those are the improved numbers!)

Some of it's probably back-end; Slack for sure has back-end performance problems, where the UI is snappy but then sits there and loads the conversation for several seconds (or has synchronization problems, or loads an old version of history, or...). And I can understand having some performance challenge here- these apps deal with huge amounts of data per-workspace. But also... it's very simple data. Mainly a series of messages, displayed in chronological order. That's one of the most straightforward possible things to optimize.

I'm just so fascinated. The HN commentary around this topic is usually lazy, but there is a genuine mystery here.

Edit: A light overview of the new version was posted below (https://news.ycombinator.com/item?id=35352521) but I'm linking it again here for visibility: https://techcommunity.microsoft.com/t5/microsoft-teams-blog/...

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.

Re:Modern software performance is firmly in its “beyond paro... by muglug on Wednesday March 29, 2023 @12:14AM (#35352442)
> I don't want to be that person who says "mrahhh a new CS graduate could have built Teams in 2002 and it would have been faster!" But I'm also like, whatever is stopping it from being faster, I can't imagine what that is from where I'm sitting!

> it's very simple data. Mainly a series of messages, displayed in chronological order. That's one of the most straightforward possible things to optimize.

When a company grows and add features that customers need, the data model has to grow with it. Queries necessarily become more complex.

I used to work at a big video sharing site. I wasn't there in the beginning, but I imagine the initial profile pages had code like

    SELECT * FROM user_videos WHERE user_id = ?
Then some users said "hey, we want some of our videos to be private".

So then the simple query became

    SELECT * FROM user_videos WHERE user_id = ? AND privacy = ?
Then they said "ok, but I want people who are mutual friends to be able to see some just-for-friends videos".

And then the query suddenly became much more convoluted. We started loading all of a users' videos in memory, then in-memory filtering, returning only the videos the viewer had access to (slow for users with thousands of videos).

Then some users came along with 30,000 videos and we had to abandon the in-memory filtering because we were getting OOMs, so we developed a hybrid system that could run queries either in-memory or in the DB depending on volume.

This is a trivial example (there are much more painful examples of data model bloat) but it illustrates the point: if you think it should be easy, you probably have an innacurate mental model of what needs to happen behind the scenes.

Re:Modern software performance is firmly in its “beyond paro... by fxtentacle on Wednesday March 29, 2023 @12:25AM (#35352557)
We're talking about Teams here, the modern UI for what used to be IRC chat. 10k users on a single server used to be a solved problem for this type of application.
Re:Modern software performance is firmly in its “beyond paro... by muglug on Wednesday March 29, 2023 @12:36AM (#35352648)
> We're talking about Teams here, the modern UI for what used to be IRC chat.

That's like saying that Chrome is a modern UI for what used to be Lynx. Those tools offer very different features, even if they share a rudimentary set of behaviours.

Re:Modern software performance is firmly in its “beyond paro... by bigtunacan on Wednesday March 29, 2023 @12:29AM (#35352589)
Yes, that's the real elephant in the room. Slack and Teams both packaged up IRC into something that looks nicer, but runs 1000x slower and now sell enterprise licenses for this garbage.
Re:Modern software performance is firmly in its “beyond paro... by roflyear on Wednesday March 29, 2023 @08:51AM (#35356498)
That's not really fair to teams and I hate it too
Re:Modern software performance is firmly in its “beyond paro... by deathanatos on Wednesday March 29, 2023 @12:33AM (#35352626)
While … sure, that's all true enough, I still routinely watch the UI load.

E.g., clicking the "emoji" window in Slack. I'll permit the custom emojis in the LRU emoji list to delay, but even the stock Unicode "text" emoji take palpable time to "load".

Re:Modern software performance is firmly in its “beyond paro... by brundolf on Wednesday March 29, 2023 @12:29AM (#35352585)
Maybe. I have more experience on the UI side, so my intuition may be off here, but I still have trouble believing that these kinds of basic slicing-and-dicing-records problems aren't solved already. Especially when we're talking separate workspaces per-org, which could each get their own DB or shard; you can't hold all those messages in client-side memory at once, but surely at the DB level it's still much less data to process than what eg. Twitter deals with. Databases are fast, and this seems like a very vanilla database-shaped problem
Re:Modern software performance is firmly in its “beyond paro... by muglug on Wednesday March 29, 2023 @12:47AM (#35352735)
Twitter is very read-heavy. Think about the average timeline — Tweets don't change (they recently introduced "editing", but it's not an in-place edit). That means many things can be heavily cached, and most people on Twitter aren't writing Tweets, so the write volume is relatively low compared to the read volume.

Now think about the average chat app like Slack or Teams. Those have a very different read-write ratio. Some things can be cached for long periods of time, but many other entities become invalidated quickly, and are subject to intricate permissions policies.

As for sharding, Slack uses Vitess: https://slack.engineering/scaling-datastores-at-slack-with-v...

Re:Modern software performance is firmly in its “beyond paro... by brundolf on Wednesday March 29, 2023 @12:57AM (#35352804)
I guess, although:

> most people on Twitter aren't writing Tweets

I don't know how true this is. Most people in my corner of twitter tweet several times a day, some of them have rapid-fire conversations in the replies. And that cache-busts (or at least appends to) a whole lot of people's feeds, just like it would people's chat history (while in both cases, almost all writes are appends)

But idk, I'll stop speculating here because I'm not basing it on much

Re:Modern software performance is firmly in its “beyond paro... by fmajid on Wednesday March 29, 2023 @05:14AM (#35354557)
Twitter is the first implementation of write-only memory.
Re:Modern software performance is firmly in its “beyond paro... by droopyEyelids on Wednesday March 29, 2023 @12:27AM (#35352571)
Yes thats what the person you are replying to is asking about these chat apps. What is adding the complexity to the chat apps.
Re:Modern software performance is firmly in its “beyond paro... by tshaddox on Wednesday March 29, 2023 @12:37AM (#35352652)
> But I'm also like, whatever is stopping it from being faster, I can't imagine what that is from where I'm sitting!

Probably a few thousand features you have never heard of and will never see or use. And the vast majority of their customers will never see or use. But each one has one or two clients for whom someone decided it was vital at the time to implement that feature to please that client.

You can probably imagine one small feature that only one or two clients use that adds a very tiny, almost imperceptible amount of loading time. Now just multiply that by several thousand.

Re:Modern software performance is firmly in its “beyond paro... by brewdad on Wednesday March 29, 2023 @01:00AM (#35352830)
Easily solved by introducing Teams Lite and Teams Professional. Maybe Teams Lite Plus and Teams Professional Lite. Eventually everyone can get exactly what they need.
Re:Modern software performance is firmly in its “beyond paro... by tshaddox on Wednesday March 29, 2023 @01:36AM (#35353062)
Until you need just one of those thousands of features that are only in Professional.
Re:Modern software performance is firmly in its “beyond paro... by azemetre on Wednesday March 29, 2023 @10:54AM (#35358161)
I mean isn't this the actual problem? That teams are incentivized to pump out features and not delivery quality software? I remember a time in my career where I had to spend a good 2 months coming up with ways to reduce our build time in like 2014/2015. I was lucky to work at a company where most of leadership were engineers with engineering backgrounds but I can only imagine how bad my environment would have been if the room was full of MBAs.

Seems like when you hire bean counters and MBAs, the incentive/value structure of your team/org/company changes for the worse.

Re:Modern software performance is firmly in its “beyond paro... by pixl97 on Wednesday March 29, 2023 @01:54PM (#35360781)
Customers buy features and not speed in most cases. When your customers do that, the MBA's are making you money.
Re:Modern software performance is firmly in its “beyond paro... by mike_hearn on Wednesday March 29, 2023 @12:02PM (#35359166)
Note though, that Office and Chrome also have many thousands of features and both start nearly instantly.
Re:Modern software performance is firmly in its “beyond paro... by fxtentacle on Wednesday March 29, 2023 @12:21AM (#35352505)
For me, the only possible explanation is that Microsoft had nobody with actual experience left. The entire Teams team seems to be cheap junior developers together with CoPilot.

It's not just that Teams is failing at solved problems, it's also that they aren't using Microsoft's own SDKs and APIs themselves anymore. Windows has good fast UI frameworks and all that cool stuff like SuperBoost which can make app startup appear instantly. Why is nobody using it?

And there is no useful integration to speak of. Why do I need to re-upload an OneDrive file into Teams? The exact same file is already stored on the exact same server. Does nobody there know about the magic of SHA512?

And how come if the internet has a hiccup while I upload a file, I have to re-upload the whole damn thing? In 1980 we already had resumable uploads via FTP.

Oh and who's the vendor creating one of the best performance tracking and optimization tools? Microsoft themselves. Did nobody ever dare to run this in a proper Visual Studio?

Re:Modern software performance is firmly in its “beyond paro... by jtwaleson on Wednesday March 29, 2023 @12:41AM (#35352681)
They need to support Mac, Linux, iOS, Android too. It’s nice if you can do that on the same codebase.
Re:Modern software performance is firmly in its “beyond paro... by illiarian on Wednesday March 29, 2023 @08:06PM (#35365813)
They are a trillion-dollar company. They can afford tow rite several versions of a chat program.

Telegram does that wit just a handful of people.

Re:Modern software performance is firmly in its “beyond paro... by Hithredin on Thursday March 30, 2023 @04:37AM (#35369723)
They suppose to publish a more performant crossplateform solution.

But yeah I won't blame them not to use xamarin/maui.

Re:Modern software performance is firmly in its “beyond paro... by NovaDudely on Wednesday March 29, 2023 @01:54AM (#35353175)
It is possible but then, for example, Windows has always had some degree of amateurish stuff in it. Rumour was, so take this with a grain of salt, that the CD loader in Windows 95/98 was developed by a high school intern over a summer holiday. Would make sense how it was stall out the entire system while when you put a CD in until it has been verified.
Re:Modern software performance is firmly in its “beyond paro... by prometheus76 on Wednesday March 29, 2023 @09:24AM (#35356935)
I'll add another absurdity to your list: why doesn't Teams use the Office dictionary (which has customizable functionality) instead of making an undocumented hard-coded call to the Google Chrome repository and using their dictionary (which is not augmented with a customizable dictionary)?
Re:Modern software performance is firmly in its “beyond paro... by WinLychee on Wednesday March 29, 2023 @12:41AM (#35352686)
I'd like to see a real study done on this, but if I were to hazard a guess, I think it boils down to: organization size, feature prioritization, development process, and finally lack of knowledge or care. It's a symptom of the way software gets written in the modern day, and isn't unique to Slack or Teams at all. Companies that don't do this tend to care obsessively about it, but it's not common at all IME.

When you work in orgs with hundreds or thousands of developers working at a breakneck pace churning out feature after feature for years, on a perpetual "sprint", your architecture tends to resemble a multi-layered bowl of spaghetti. A single button click may result in hundreds of database calls (maybe concurrent, maybe cached), or at a minimum invoke dozens of javascript packages in a Rube Goldberg-esque fashion to perform an action which should take a modern computer a single digit number of milliseconds, but instead results in 10 second load times. Sometimes people just completely forget about entire code paths, and then it becomes dangerous to delete since the persons(s) who wrote it either no longer work there, or got reorged and moved on.

There are absolutely people who care about software performance, but it isn't a priority because it usually doesn't make you more money, won't get you or your boss promoted (unless it saves money), and is difficult to maintain in the long-term given the pace of change in large codebases. When you do tackle performance problems, it's because you were absolutely forced to due to necessity. In certain domains it is also more important e.g. games, embedded systems, ML applications, etc.

One other thought, is that many developers today cannot build software from first principals, as they never learned how. Many only know how to build within the context of a browser environment, and think a "minimal" app is https://create-react-app.dev/ . That's not just me grumbling, it's how our industry works. You forget the layers below you, and build new ones, each generation forgetting most of what the prior knew. The result is giant bloated applications, and a normalization of slowness in software.

I still have hope for small teams of dedicated devs. Fast, coherent software gets written by tiny teams or single individuals.

Re:Modern software performance is firmly in its “beyond paro... by brundolf on Wednesday March 29, 2023 @12:44AM (#35352714)
Yeah, the organizational issue is my guess too. Though I'm still amazed Teams managed to spiral down that path so quickly
Re:Modern software performance is firmly in its “beyond paro... by WinLychee on Wednesday March 29, 2023 @12:52AM (#35352776)
Microsoft used to be able to create really great desktop software. I thought Windows 98, XP, and 7 were incredibly slick and well done. Old versions of Office ran well on CPUs slower than those found in modern toasters.

I too am curious of what sort of... dynamics are going on internally. I blame Agile/Scrum lol.

Re:Modern software performance is firmly in its “beyond paro... by nitwit005 on Wednesday March 29, 2023 @12:22AM (#35352521)
Blog post on the UI re-architecture: https://techcommunity.microsoft.com/t5/microsoft-teams-blog/...

Sounds like they just rewrote the whole thing from scratch, down to replacing Electron.

Re:Modern software performance is firmly in its “beyond paro... by fxtentacle on Wednesday March 29, 2023 @12:24AM (#35352540)
They replaced Electron, but without getting rid of the actual problems. It's still basically a React website wrapped in a web browser.
Re:Modern software performance is firmly in its “beyond paro... by stathibus on Wednesday March 29, 2023 @12:31AM (#35352606)
It’s a skill issue.

This is what you get when your developer team has only ever known programming through the lens of terrible tools and practices. They’ve probably never worked on good software before.

Re:Modern software performance is firmly in its “beyond paro... by bin_bash on Wednesday March 29, 2023 @12:27AM (#35352568)
> from scratch

they replaced electron with a MS Edge Web View which is still running V8. I wouldn't say they rewrote it "from scratch"—that would be more like rewriting it in C#

Re:Modern software performance is firmly in its “beyond paro... by brundolf on Wednesday March 29, 2023 @12:42AM (#35352693)
They also transitioned from Angular to React, which is not a natural transition, so it probably was nearly a rewrite
Re:Modern software performance is firmly in its “beyond paro... by DANmode on Wednesday March 29, 2023 @02:18AM (#35353320)
That's what the blog post refers to it as.
Re:Modern software performance is firmly in its “beyond paro... by brundolf on Wednesday March 29, 2023 @12:33AM (#35352623)
Oh this is great, thanks for sharing!
Re:Modern software performance is firmly in its “beyond paro... by millimeterman on Wednesday March 29, 2023 @12:28AM (#35352579)
I think the boring but true answer is simply that no one cares.

Users don't care because Teams still basically functions and the performance problems are at most a minor inconvenience. As a result, organizations don't care because Teams is cheap and does everything they need it to. As a result, Microsoft doesn't care because dedicating dev resources to something which neither saves them money nor attracts more customers is a waste.

Microsoft employs many smart people and I'm sure Teams' performance could be improved by orders of magnitude if they wanted to. But why would they want to?

(And to reinforce my point, when the performance _did_ get so bad that people apparently actually started caring, Microsoft not only improved it but made a video advertising it. It's just that there's no incentive to optimize any further than is necessary.)

Re:Modern software performance is firmly in its “beyond paro... by spondyl on Wednesday March 29, 2023 @12:34AM (#35352627)
Anxiously, I would almost say "No one important cares"?

In my experience, the further up the org chart you are, the less likely you are to use Slack directly, instead deferring to assistants or at least only posting announcements periodically.

Ditto goes for Internal IT who I've commonly found never use these chat platforms instead deferring (correctly) to ticketing systems.

Those two groups are both the ones who would probably advocate for adopting these platforms yet they never use it in any regular sense so they don't feel the sharp edges

Re:Modern software performance is firmly in its “beyond paro... by millimeterman on Wednesday March 29, 2023 @12:47AM (#35352738)
I know of mid-size organizations where everyone up to the very top complains at length about Teams being slow and buggy. But they still use it, because it's cheap and doesn't actively hinder work getting done. I don't think it's simply a matter of bean counters being out of touch.
Re:Modern software performance is firmly in its “beyond paro... by brundolf on Wednesday March 29, 2023 @12:30AM (#35352601)
That's part of it, but also, they just published a whole marketing video to advertise a performance improvement
Re:Modern software performance is firmly in its “beyond paro... by millimeterman on Wednesday March 29, 2023 @12:53AM (#35352778)
Sorry, I imagine you posted this before my edit. I don't think this marketing video contradicts my point at all. For Microsoft to commit a large amount of dev time to rewriting Teams and improving its performance, there must have been an actual business reason. That's not something you do because some nerds on HN think your app is too slow.

Presumably, Teams was so unbelievably slow that it crossed over to being an actual problem for customers and not just a mild nuisance. So Microsoft improved performance just enough to stop affecting sales. Is the performance _good_? No, it's still comically slow. But there's simply no incentive to improve the performance further.

Re:Modern software performance is firmly in its “beyond paro... by brundolf on Wednesday March 29, 2023 @01:01AM (#35352842)
I agree that this became an exception because it was so bad that it crossed into mainstream awareness

But:

> there's simply no incentive to improve the performance further

The breakdown here (https://techcommunity.microsoft.com/t5/microsoft-teams-blog/...) indicates this was a monumental rewrite, almost green-field, with the singular goal of fixing performance. I don't think they slumped on effort this time

Re:Modern software performance is firmly in its “beyond paro... by illiarian on Wednesday March 29, 2023 @08:09PM (#35365833)
> Users don't care because Teams still basically functions

People definitely care. If you actually listen to them. They will tell you what a hot pile of slow garbage it is.

Re:Modern software performance is firmly in its “beyond paro... by millimeterman on Monday April 03, 2023 @07:50PM (#35433098)
Talk is cheap - actions are what reveal true preferences. The fact that Teams is so widely used despite it being slow garbage indicates that people actually don't care (enough to overcome whatever benefits they see in Teams).
Re:Modern software performance is firmly in its “beyond paro... by paulddraper on Wednesday March 29, 2023 @12:16AM (#35352463)
As software features evolve over years, they gradually incur more and more incidental complexity.

Architecture suffers, code health, and performance suffers. Silly things are done, but it's hard to see they're silly because it's hard to see the entire picture

Could you build it better from scratch rather then organically? Of course. And often that's part of the solution to these situations.

tl;dr Building software is hard, and its difficulty does not scale linearly with complexity. (And yes, Teams/Slack are complex, even if they "shouldn't be")

Re:Modern software performance is firmly in its “beyond paro... by intelVISA on Wednesday March 29, 2023 @01:48AM (#35353137)
Always amusing to see the tech equivalent of fast food workers (web dev) being grilled because they can't cook gourmet steaks... well duh?

...I can't write CSS and nobody moans so why should web devs be expected to engineer software?

Re:Modern software performance is firmly in its “beyond paro... by prometheus76 on Wednesday March 29, 2023 @09:52AM (#35357293)
Because most of them don't know the difference between web dev and software engineering. Hence the joke of claiming that a 10-second startup time for what is essentially a web app is touted as advertising-worthy.
Re:Modern software performance is firmly in its “beyond paro... by NovaDudely on Wednesday March 29, 2023 @01:51AM (#35353152)
Reminds me of how GTA Online was crawling on initial load because a single thread was parsing a 10MB JSON file.

Maybe modern software is like that. Just a hundred small inefficiencies that don't look like much when benchmarked on an individual part of the stack but combine into a monster.

Re:Modern software performance is firmly in its “beyond paro... by muhehe on Wednesday March 29, 2023 @05:59AM (#35354899)
It was about 25mb, but that would be still nothing for current computers. The problem was it was done by custom-made super inefficient parser.
Re:Modern software performance is firmly in its “beyond paro... by v8xi on Wednesday March 29, 2023 @09:31AM (#35357025)
I remember reading how MS Word formatting is such an utter PITA because of required backward compatibility going back to the first version(s) that were just done terribly. I wonder if it might be this way in all their apps
Re:Modern software performance is firmly in its “beyond paro... by runnerup on Wednesday March 29, 2023 @07:21PM (#35365341)
> I don't want to be that person who says "mrahhh a new CS graduate could have built Teams in 2002 and it would have been faster!" But I'm also like, whatever is stopping it from being faster, I can't imagine what that is from where I'm sitting!

One way to test this...MSFT could open the Teams API and some 16 year old could try building a client.

Re:Modern software performance is firmly in its “beyond paro... by phendrenad2 on Thursday March 30, 2023 @06:40AM (#35370640)
* * *