5 ms·
Most engineers are unfamiliar with how to improve their software’s performance, unfortunately. This has nothing to do with any individual technology stack or pr
by saagarjha 4y ago
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.
- Jtsummers 4y ago> 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".
- saagarjha 4y agoHeinlein 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".
- Jtsummers 4y agosoftware 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.
- 908B64B197 4y ago> 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.
- saagarjha 4y agoAre 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?
- lapcat 4y ago
- brundolf 4y agoTeams 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)
- saagarjha 4y agoI 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.
- seadan83 4y agoThis 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/27/welcome-to-the-new-era-of-microsoft-teams/ https://www.microsoft.com/en-us/microsoft-365/blog/2023/03/2...
- 908B64B197 4y ago
- slfnhilljohn 4y agoActually we know for a fact that the tech stack they are using is fundamentally bad.
- saagarjha 4y agoThat'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.
- jesse__ 4y agoOne 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.
- seba_dos1 4y agoLet'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)
- amoss 4y agoWhy? 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?
- seba_dos1 4y agoBecause 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 (or maybe even feasible to employ) for an office application. You usually optimize application rendering for smoothness (no frame drops, no artifacts, consistent 60 FPS) rather than latency, and improving one usually hurts the other. And that's ignoring the input path, which brings its own latencies too.
- JohnFen 4y ago> 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.