5 ms·
And yet Slack runs just fine on my 2016 12" MacBook, iPhone 7 Plus, and iPad Mini 4.
by mordant 10y ago
And yet Slack runs just fine on my 2016 12" MacBook, iPhone 7 Plus, and iPad Mini 4.
- coldtea 10y ago"...with a single team of 5 and 2 channels". Seriously, it's not about "running just fine", it's about how many resources it uses. Even the startup time is awful for what it does. And the Slack team itself recognizes that there are issues -- as seen in TFA: "However, these capabilities come at a cost: the desktop client can use a lot of memory. This memory footprint increases as the user signs into more teams, as each team runs in its own webview. More memory usage means worse performance, degrading our customer’s experience of Slack and their other applications." and: "At the time of writing, about 36% of active Slack users are signed into more than one team in the desktop app. 17% are signed into 3 or more teams, and 5% are signed into 5 or more teams. Each of these teams is running the full JavaScript web application and maintaining and updating the DOM tree as the state of the team changes. This application can consume between ~130MB (p10) and ~960MB (p99) of memory depending on team activity and UI state."
- bborud 10y agoI suppose you may not know any better. And I am not saying that to be mean, I'm merely pointing out that your frame of reference may not be the best to judge how well the desktop Slack client was done with regard to resource use. You may not understand just how few resources the desktop client could reasonably be expected to consume. And you would not be alone. Over the past 7-8 years I'd had to teach people how to benchmark things. I see people measure things and then use their first result as the performance reference. Sure, they can see relative changes, but if you are orders of magnitude off a reasonable result, a relative reduction of a few tens of percent is still orders of magnitude off. As a developer you should have an idea what a _reasonable_ number ought to be. For CPU, for memory, for latency, for anything you care to measure. "It runs just fine" isn't data. It isn't a useful metric for performance.
- joekim 10y ago> "It runs just fine" isn't data. It isn't a useful metric for performance. I don't see any claims from "mordant" that their anecdote is a useful performance metric. If anything it'd be a data point that could be used as a user experience metric. ie. X% of users in the target demographic agree with this statement, "works fine for me." The point was a counter to your claim of Slack being, "offensively wasteful". Further, isn't "offensively wasteful" equally useful as a performance metric? If you're experienced in performance perhaps you could share some of your "reason numbers" and contrast that to measurements your made against the Slack client.
- bborud 10y agoBy "offensively wasteful" I mean off by orders of magnitude. At which point the problem isn't one of mere programming but of actually having some idea of what you are doing. Recovery from this state of affairs doesn't happen by telling people how to fix concrete, individual things, but teaching them to think about what they are doing and to analyze things. In order to know when you are off by orders of magnitude you need to have some idea of what is reasonable before you measure. If the reality you achieve is way off what is reasonable, you either need to change your perception of what "reasonable" is or you have to face the possibility that you may not have done a good job. A chat client that deals with perhaps 3-4 teams and perhaps 200-300 people should not require 1Gb of memory and it should consume a negligible amount of CPU. Any way you slice it that's a LOT of resources per user, per team or per communication volume. So Slack miserably fails even cursory glance at workload/resource usage. You can start off with the lower layers: speaking a chat protocol. How much resources should that eat up? For a chat application: too little to measure on a modern machine. (I spent most of the early 2000s working on web-scale web crawlers on much, much weaker server machines than even cheap desktop machine is today). The IO should have trivial cost, the protocol parsing should likewise have trivial cost or you have messed up badly. Then move on to the internal state. Draw it on paper. What are the main structures you will be needing. How much data do you need to keep in memory, how much space does it need to take, how do access it and manipulate state? What is a reasonable CPU expenditure? Next is the UI. How do you make it responsive. How do you make it not gobble up tons of memory. Are there tradeoffs you can make? How do other applications do things? Where are the resources wasted? One doesn't produce a resource hog like Slack by doing one or two things in a wasteful and sloppy manner. One does it by having the wrong attitude and systematically doing a bad job.
- viraptor 10y agoI see a lot of it lately. For example I looked for some kind of status bar GitHub notification tool. The most popular open source one includes its own electron environment... to display one icon and a list. That's a >100MB app for a completely trivial task.
- ris 10y agoAnd yet I can do internet chat just fine on my Names three outrageously expensive and highly powered devices...