10 ms·
Modern software performance is firmly in its “beyond parody” stage
- deleted 4y ago[deleted]
- rayiner 4y agoIdiocracy didn't spare Silicon Valley I guess.
- gct 4y agoPerformance just isn't prioritized. If you spend a week optimizing making something faster, you just get hit with the ill-quoted premature optimization line and shamed for not working on higher priority tickets. Fine, I'll just leave it slow then.
- jesse__ 4y ago>> you just get hit with the ill-quoted premature optimization line Frankly, if someone says that to you and they're not shipping software that runs locked at 60fps, fuck them.
- gct 4y agoMy defense is usually that it's ok to have a little pride of craftsmanship, and if you let people scratch that itch they'll be happier and more content in their jobs, making it a long-term cost saver.
- culi 4y agoMaybe not directly related to "performance" but I just need to say this somewhere... The back button in the new Bing DOES. NOT. WORK. and it's absolutely wild to me that this isn't talked about more. "Don't break the back button" is a trope in web development. I genuinely thought Bing was a better search engine than Google and tried switching my default (this was just before all the ChatGPT stuff). After a week I just couldn't handle it and had to revert back to Google
- wodenokoto 4y ago> "Don't break the back button" is a trope in web development. Is it? I’ve been having an inner rant about how modern web ignores the back button. Reddit and YouTube completely breaks the back button. Click a video, click back and a completely new list of videos are shown. Same for Reddit. On top of that almost every news site inject their front page behind the article you clicked so back keeps you on their property. Clicking back on Facebook gives you a new feed.
- StableAndro 4y agoYouTube lately has this issue where the back button just doesn't work at all. I click to take me back to search results and nothing happens; I click again and then I see whatever I had opened prior to YouTube. Also Google Shopping doesn't let me change my search terms: I type something new, press enter, and nothing happens. And Google Search has been showing the wrong dates for Reddit threads, showing older posts than the time range I selected. All of these issues have shown up only in the past month or two (maybe massive layoffs lead to massive mistakes?).
- Arrath 4y ago"Check out these articles before you go!" No! I clicked back for a reason, respect that!
- RachelF 4y agoThe thing is users are OK with poor performance. As the speed of computers increases, software speed remains pretty much the same. Teams is an Electron app, I think, so the whole thing needs a huge baseline in order to work. Being proud of a chat app now only using 500MB instead of 1000MB is odd.
- Espressosaurus 4y agoUsers complain. The people in charge of signing the checks don't give a shit.
- eternityforest 4y agoObviously they do, someone prioritized making teams 2x as fast, and many other apps seem to be faster too. The problem is they've only cared for like, the last 3 years, and everyone was enslaved by that "premature optimization is the root of all evil" quote for the last several decades, while blaming "complexity" for slowness.
- mike_hearn 4y agoThe people in charge of signing the checks do care but consider Office/Outlook to be non-negotiable, and then Teams is 'free', so it's seen as the lesser of two evils.
- Ekaros 4y agoUsers don't have choice. And alternatives aren't that much better...
- jiggawatts 4y agoTeams is an entire web server written in an interpreted language compiled on the fly using a "Just in Time" optimiser (node.js + V8) -- coupled to a web browser that is basically an entire operating system. You're not "starting Teams.exe", you are deploying a server and booting an operating system. Seen in those terms, 9 seconds is actually pretty good. Seen in more... sane terms, showing 1 KB of text after 9 seconds is about a billion CPU instructions needed per character.
- jesse__ 4y ago> showing 1 KB of text after 9 seconds is about a billion CPU instructions needed per character Correct me if I'm wrong, but on a 3ghz CPU (3bln cycles per second), there are 27 billion cycles per character for 1kb of text. Take into account that on any non-stone-aged CPU you've got probably 4-16 cores, and can do ~4-8 SIMD ops per cycle (at full clock rate), so at the limit we're actually talking .. something like _3.4 TOPS PER BYTE_ ..
- jiggawatts 4y agoA typical modern CPU can retire 2-3 instructions per clock, per core. Somewhat more due to hyper-threading, so maybe 5 per clock per core. So a 3 GHz, 8-core processor for 9 seconds is 5i x 3Ghz x 8c x 9s = 1 trillion instructions. Divide by 1KB to get roughly 1 billion instructions per character. SIMD is a little unfair, because virtually none of what an app like Teams does is amenable to vectorisation. If we allow SIMD, then we have to allow the GPU, and then we're talking about an entire different order of magnitude. A decent last-gen GPU has something like 30 teraflops, so about 265 billion instructions per displayed character!
- jesse__ 4y agoI didn't think about how many instructions a core could physically retire per clock, good point. > SIMD is a little unfair Yeah .. I agree, but I wanted to illustrate (to your point) just how much juice modern chips have.
- crooked-v 4y agoI had to work with a 2.1 GB JSON file today. It was really striking that, on a machine with 4 GB free RAM, I could find literally nothing that could work with the whole thing in memory as JSON, including every GUI editor I looked at, Node, jq, etc.
- fourseventy 4y agoNeed to use something like less or tail
- Swizec 4y agovim is my go-to for large text files. Works great even on TB-sized monsters.
- bcrosby95 4y agoJust make sure your syntax highlighting is off if its something like xml.
- upon_drumhead 4y agowhat where you trying to do with it? I often work with jq on very large json files without much issue.
- crooked-v 4y agoIn this case it was a single giant object I was trying to extract a specific list of keys (with unknown value lengths) from. Every method I found with jq died with out of memory errors.
- upon_drumhead 4y agoDid you try using streaming? https://stedolan.github.io/jq/manual/#Streaming https://stedolan.github.io/jq/manual/#Streaming You have to rewrite your criteria, but it's what's allowed me to process huge json files without issues.
- 4y ago
- brhsagain 4y agoCasey (author of tweet) currently has a great course out called the Performance-Aware Programming Series where he goes over the fundamentals and first principles of how computers execute programs, and what actually needs to happen for the computer to complete the actual task it's trying to do: https://www.computerenhance.com/p/table-of-contents https://www.computerenhance.com/p/table-of-contents It's striking to try and imagine the relevance of the course to the average web programmer. Like a React developer is so far removed from these considerations that I'm not sure where he'd even begin to try and apply these lessons. That's crazy to me, that this stuff is what the computer is actually doing, and modern programmers' model of software development doesn't even have the concepts or language to relate to these ideas.
- deathanatos 4y agoWow, that there's a video on haversine is uniquely interesting to me. We used that to compute "all points within a circle", which is basically a loop over your candidate points, compute the distance from the circle's center, and then discard those too far away. (The candidates are generated by some conservative approximation, such as by geohashes or R-trees. And there's all sorts of room in that first approximation for optimizing too.) There's all sorts of room for optimization. Those familiar with 3D programming probably know the "use distance², not distance" to avoid needing to sqrt(), and similar tricks apply (you don't need to work in miles: e.g., you can convert the target distance to arc distance, and use that, which is what haversine speaks natively). We were also trying to get Go to inline some of the wrapper calls (so that we could work in more sane units, like lat/lng, and have a wrapper convert to, IIRC, radians) … but alas, Go only inline leaf functions, and the trig calls haversine requires basically meant we were never a leaf. Also hit the uniquely human problem of: if you compute the query, you can spend infinitely long doing it: the right circle is fine if centered over Wyoming, but quite a problem if centered between NYC & Philly. (So as to overlay both.) If you don't detect the case, you'll time out, and users are unhappy. If you detect it and abort, users don't get data … and are unhappy. There's no way to win. … then the "higher level" stuff knocks you down three pegs for trying to eek a few milliseconds out of haversine when you find out the protobuf library encodes the response slower than JSON, despite being binary. (But protobuf was written in Python, vs. the JSON library is in C. There's a C protobuf lib … but its own unittest segfaulted at the time. I hope it has been since fixed, but ugh.) Also looked at our point type in Python. As you can imagine we alloc'd a few million of those, and the simple definition in Python of, class Point: __slots__ = ('x', 'y') def __init__(self, x, y): self.x = x self y = y contains three heap allocations, and not small ones either, for what can be done for 16 B on the stack in some languages. (And then we'd done some rather dumb things … which I see repeated a lot, not just at this job, like SQL databases with an ENUM column declared as VARCHAR, and the same string repeated forever and ever through the DB. All you needed was a SMALLINT, an ENUM if its supported… And so much CSV.)
- Gigachad 4y agoTo be fair, Teams is probably the worst piece of majorly used software there is. You couldn't find a better example of slow garbage. Also, I just tried the boot up example and old teams finished loading faster than the videos new teams.
- dangus 4y agoI think they used a pretty slow computer for demonstration purposes. Cynicism about modern software aside, I’m glad to see Teams, an app that many of us are forced to use by our employers, improve performance. It was desperately needed. I don’t think this type of performance is some kind of horrid modern software epidemic, it’s just Teams being a garbage application that was thrown together to try and answer to Slack.
- brundolf 4y agoI'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 https://news.ycombinator.com/item?id=35352521) but I'm linking it again here for visibility: https://techcommunity.microsoft.com/t5/microsoft-teams-blog/microsoft-teams-advantages-of-the-new-architecture/ba-p/3775704 https://techcommunity.microsoft.com/t5/microsoft-teams-blog/...
- saagarjha 4y agoMost 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.
- jesse__ 4y agoOne of the replies to the tweet is just gold. >> If you were making a parody video, you would imagine it would look exactly like this video - like joking about how people would be proud of these timings. But IT'S REAL!
- wodenokoto 4y agoIs linking to Twitter just a way to circumvent the “don’t editorialize headlines” rule? Direct link to “new teams vs old teams”: https://youtu.be/CT7nnXej2K4 https://youtu.be/CT7nnXej2K4
- richbell 4y agoIt's not editorialzing a headline. The context of the Tweet is what's being shared.
- lacker 4y agoTeams is also an incredibly successful product, moving far beyond Slack in terms of usage, so it's an interesting case study. My guess is that speed just hasn't been one of the top priorities, and they have instead prioritized cramming lots of features in there, both to copy Slack's functionality and to add integrations into other Microsoft products that help make the sale when they're pitching Teams to customers. It is certainly aesthetically displeasing for such a relatively simple product to be slow, but it often makes business sense that it's not a top priority.
- deleted 4y ago[deleted]
- brhsagain 4y agoThe problem with this argument is that software is not just a little bit slow, it is insanely slow. Like if you break down what Teams actually does, and count how many CPU cycles that should take with some quick napkin math, Teams is slower than that by at least a thousand times. Obviously this kind of first-principles thinking is idealistic, but the result should not be underperforming that by several orders of magnitude. The real problem is just the general practice of how software is developed now. If we lived in a world where software development was sane, it would be possible to prioritize speed of development and cut some corners to ship faster, and get a result that is somewhat slower but not ten whole seconds to start up slow.
- anongraddebt 4y agoMy girlfriend works for a large consulting firm. Her mid-to-high-end work laptop runs the standard smattering of PM applications you’d expect (e.g. Teams). I watch her screen sometimes to see the differences in our workflows. It is incredible the high latencies and low speeds she has come to view as acceptable in application performance. 2-3 seconds to toggle a menu that’s toggled 30 times in a day; 4 seconds for a small file list update that is performed regularly; tabs in Edge frequently hanging; on and on this goes. Just sad, really, especially when we have a half gig connection going both ways. The work being performed (and the features designed to do it) should not be seen as resource heavy… because it isn’t. It’s the same exact bs that was done on computers in corporate settings 20 years ago. We’ve added collaborative editing and auto save as defaults - that’s the extent of the difference. How did we get here?
- AtlasBarfed 4y agoUi devs should be forced to use pentium 3s for all work and testing.
- frodowtf 4y agoWhat's up with the general hate against frontend developers? They literally make your rocketscience backend stuff accessible to users.
- Espressosaurus 4y agoBecause Teams (and Slack) are glorified IRC for the text portions and yet we have experiences like Teams[1]. You're seeing pent-up frustration about poor performance that we all deal with every single day, on most applications and almost all websites other than those that keep things simple (like HN). [1] https://twitter.com/cmuratori/status/1640827575437250561 https://twitter.com/cmuratori/status/1640827575437250561
- frodowtf 4y agoI have never used IRC. How would you do video calls with that?
- TT-392 4y agoI mean, honestly, I think all devs should. Except maybe the people who work on such cutting edge stuff that they already need every bit of optimization they can get, even on their $2k+ pc.
- TT-392 4y agoThough, maybe not that specific processor. Maybe more like a severely underclocked 8 core, or some really old 4 core. Having only a one core to develop with is gonna seriously hinder the development of multicore optimizations.
- machiaweliczny 4y agoChrome has both CPU and Network throttling. I use both when developing (if you pay me enough for quality).
- lmc 4y agoBeginning to think that MS Teams was actually developed as a surreptitious way of encouraging the workforce back to the office.
- jsz0 4y agoThe amount of micro-stuttering, scroll lag, input lag, etc of modern software is at the level where in the past you would have assumed your computer was broken if it performed this way.
- AraceliHarker 4y agoIs it too cynical to think that Microsoft deliberately made their Teams app sluggish in order to persuade people to buy new PCs during the pandemic, but when that didn't work out as well as they hoped, they reluctantly optimized the app?
- politelemon 4y agoYes, and I'll also add it's quite typical of us in the HN comments. It increases the toxicity of this community.
- plugin-baby 4y agoDid google docs recently do an update to make the UI slower? I just returned from leave, and it seems even worse than before.
- deterministic 4y agoMost developers don’t have a clue about performance. A friend of mine (an average developer by his own account) joined a company that had just lost a $10 million contract because of low performance software. He has a background in games development. So he raised an eyebrow, ran a profiler to figure out what the bottleneck was, and fixed the problem. In less than a week. Now he is treated like a super star by management and other developers. So knowing how to make software fast can be a real benefit.
- virtualritz 4y agoI wager that one issue is the generation gap now. I grew up with software on MS-DOS, Windows 95/NT and Unix (SGI IRIX). Shit was just fast compared to today. Technically I blame mainly platform bloat and everything being a webview pretending to be native app these days. But from a human perspective, younger developers never experienced how snappy desktop stuff was back then. So what seems 'ok' or 'fast enough' to them is just how sluggy stuff is, in average, nowadays.
- ilrwbwrkhv 4y agoI agree. It reminds me of Jonathan Blow's talk on Preventing the Collapse of Civilization https://www.youtube.com/watch?v=ZSRHeXYDLko https://www.youtube.com/watch?v=ZSRHeXYDLko
- gorkish 4y agoAverage human lifespan = 2.3 billion seconds. With 280 million teams users, a human life's worth of time is needlessly consumed every 8 seconds that Teams spends yanking its own chain.
- culi 4y agoLove this, admittedly absurd, metric. Gonna use it on projects my team works on :)
- gorkish 4y agoI don't think it's an absurd metric at all. I think it's terribly unfortunate. Software optimization on the whole would be a lot better off if developers took a lot more time to think about the scale of the products they work on and if users refused to put up with software and systems that don't respect users' time and agency. If someone wants to calculate the lifetimes lost to Windows Update, I'd be interested in knowing how it compares to historical wars.
- fallingfrog 4y agoWord perfect took 13 seconds to load up on my 486 at 25 megahertz in 1992. And I thought it was absurdly slow.
- ulizzle 4y agoI'm for sure getting older cus I remember the times we used to make fun of ppl for being neckbeard performance nerds, and now I find myself firmly in that camp.
- fallingfrog 4y agoWhenever a product does something truly baffling, management and money are involved. The management forced the engineers to do something stupid, in order to sell something to someone. The details vary.