5 ms·
I’m still skeptical. The memory usage chart from the article shows only a slight (10%?) improvement for single-workspace Slack clients, now at around 250MB. Ye
by DaiPlusPlus 7y ago
I’m still skeptical. The memory usage chart from the article shows only a slight (10%?) improvement for single-workspace Slack clients, now at around 250MB.
Yes, getting a 5+ workspace client down from ~800+MB to 300MB should be applauded - but the 250MB floor is still too high.
I want to know what’s in the 250MB it’s still using.
- penagwin 7y agoIn my experience at least ~100/150MB will be electron's minimum anyway, certainly impressive what they've done but I think they've basically hit bedrock unless they either improve electron itself or switch to something different.
- harryh 7y ago250MB floor is still too high Too high for what? Low end desktops and laptops today come with 8GB of ram. Using ~3% of that for a chat app doesn't seem like a big deal.
- msbarnett 7y agoToo high compared to similarly featured (or even more full featured) programs built on other technologies. 3% on an Electron chat app here, 5% on an Electron text editor there, and pretty soon you’ve managed to replace what could’ve been several apps with small memory footprints plus several gigs of efficient file caching in a users’ RAM with just a few bloated programs crowding out the cache, and made their entire machine considerably less responsive.
- harryh 7y agoIf someone is running so much stuff that an app (or a few apps) using ~250MB of ram instead of ~100MB (or whatever) of ram is a huge problem they can easily spend $200 or so for an extra 8GB of ram. Ram is cheap. Usage at this scale just doesn't matter to the vast majority of users.
- thecopy 7y agoMy RAM is soldered on.
- SkyMarshal 7y agoAgree in principle, but available Ram real estate (slots) is limited, esp in mobile.
- ben509 7y agoOf course, if Slack thought this were true, they wouldn't have bothered with this rewrite. Obviously no PM is going to tell customers, "just spend $200 for another 8GB of RAM to run our chat software." > Usage at this scale just doesn't matter to the vast majority of users. The usage model is that it's on all the time. So if it's draining batteries, causing paging or otherwise slowing things down, people are going to quit Slack, thus defeating the immediacy of communication, thus defeating the point of running Slack. And Slack becomes powerful when it can be required by a workplace, which is their business model. This means the "vast majority" isn't enough at any given company.
- thenewwazoo 7y agoRAM is cheap but slow, and CPU cache is precious.
- ebg13 7y ago> Ram is cheap RAM is cheap...and not upgradeable on the majority of devices in the world.
- msbarnett 7y agoAside from the obvious issue that a ton of devices don’t have user upgradable RAM, are we really this comfortable with feeding constant consumerist abandonment of old devices through our own sheer laziness as developers? “It only uses 8% of 8GB of RAM. If that’s an issue consumers can buy more RAM or throw away their devices and buy new ones” is soon phrased as “It only uses 8% of 16GB of RAM. If that’s an issue consumers can buy more RAM or throw away their devices and buy new ones” and soon after etc, etc At some point, preferably before we start saying “it’s just half a terabyte of RAM to run a chat app”, we may want to step back and question this circular justification for ever increasing bloat and ask ourselves when enough is enough. There’s been no real gain in functionality in the past 10-20 years of chat app churn, just an enormous explosion in RAM and CPU requirements.
- asark 7y agoThose memory-bloat apps are never, never only memory hogs. They always come with an outsize hit to general system responsiveness, always have UI lag, and so on. These days almost all of them are webtech junk. I still have a few Java programs with that problem —I've been reading "it's in your head, here's a proof that it can't be as bad as you say" for like 20 years now and those folks continue to be wrong in practice—but webtech's even worse. Which makes perfect sense. If you're operating on more memory than should be necessary you're gonna be burning a lot more processor/battery than is reasonable, too.
- harryh 7y agoI've been using Slack on the desktop daily since the alpha version. I've never found it to have UI lag. I honestly think that most people us use phrases like "webtech junk" are offended on principle and not because of any measurable difference that matters to regular users.
- pas 7y agoI use it on the desktop too. And it is slow. Slow to start, slow to load channel data. Slow to appear after alt-tab, and so on. I think it is because it expires caches left and right, loses track of events, or I have no idea what else could be going on on a PC with 16GB RAM (plenty of it free) and stable Internet connection.
- asark 7y agoLow-latency UIs that respect user input are amazing. They're just quite rare these days. I guarantee the difference is noticeable and makes a difference—look at how everyone liked (and still likes) the UI smoothness and low UI latency of iOS, for example, and iOS, though probably the current front runner on this front for popular operating systems, is just so-so at it. I guess if my principle is that I like my computer to respond quickly and accurately to my input then yeah, I dislike webtech junk on principle. [EDIT] as far as it not mattering, everyone I know, including plenty of non-techies, who has used Google Docs hates it, due to the UI lag. Typing with that large a delay between keypress and the letter appearing sucks. They may use it anyway because they have to, but they all complain about how laggy the UI is, responding to clicks and keypresses.
- DaiPlusPlus 7y ago8GB - minus OS load gives you about 5-6GB to play with. The problem isn’t with Slack itself - as more and more desktop software run on Electron then with 8GB of RAM you can only have a handful of instances open simultaneously before you get performance- crushing disk paging.
- kllrnohj 7y agoJust because there's enough resources for it doesn't mean it was a good use of those resources. Why should it be reasonable for displaying a few megs of text & maybe a dozen megs of images to take 250MB+ of RAM? What is the rest of that memory usage, and why is it loaded? CPUs don't like executing code that's not in cache, so hopefully it's not code. And if it's not code, what is it? Figure a few dozen MB for the graphic buffers, but where's the other 100MB+ gone?
- jrockway 7y agoLow end desktops come with a gig of RAM. A $35 Raspberry Pi is what "low end" really is. While 250MB is a big chunk... I think it's actually okay, even in this extreme case.
- fnord123 7y agoThat memory is for IntelliJ, Docker images, Photoshop, Final Cut, Blender, etc.
- paulddraper 7y ago> Too high for what? Too high for an app that runs continuously.
- harryh 7y agoNearly all users continuously run web browsers these days and they all consumer a lot more ram than slack.
- yjftsjthsd-h 7y agoYes, and that's a problem. Additionally, if the OS and browser are both always running, then there is even less memory left for your app! So this is a stronger argument to use less, not an excuse.
- GuB-42 7y agoMy opinion is that there is no low threshold for RAM use. If you can go down from 200kB to 100kB, that's still a win, even in a 32GB machine. The reasons: - Cache. RAM may be >8GB but the CPU L1 cache is just 64kB. And L1 cache is about 100 times faster than RAM. From my experience, proper cache management is by far the most important low level optimization, and most of it can be archived by just using less RAM. - What are you doing with all that RAM? 250MB in absolute terms is huge. The entire Harry Potter series is around 5MB uncompressed. For that size you can also have a 1080p fullscreen RGB image, uncompressed. What it means is that unless you are working with large datasets, these 250MB represent a huge amount of stuff you don't control. Lots of moving parts with potential performance bottlenecks, security issues, etc... - Every byte your app is using is one less byte for your system caches. Wasting RAM makes your whole system go slower. - Finally, an ethical argument. Your chat app will run continuously on millions of PCs. On that PC are libraries, kernel code and frameworks where people worked hard squeezing every bit of performance they could. Saving energy and making your apps run to their full potential. For me, a background app made by a company the size of Slack have a duty to be as light as possible, as not to interfere with the actual work people are doing on their machine.
- illuminati1911 7y agoThis is self-deception. While technically you are right, you don't actually have full 8GB to allocate to JS bloat apps. After the OS and all the other necessary stuff what you will always have running in the background like browser etc. you'll be left with 4-6GB.
- ex3ndr 7y agoiTerm2 eats 150mb+. Any cocoa app use that much of memory. App Store is 500mb just after launch.
- seandougall 7y ago> Any cocoa app use that much of memory. What gives you that idea? Lots of apps have cruft, but that's nothing to do with Cocoa. A "Hello, world!" in Cocoa uses around 13 MB, and the application bundle weighs in at 79 kB. The fact that Electron uses a bare minimum of over 100 MB just to get an application running is a source of some understandable consternation.
- Klonoar 7y agoHis point is, actually, quite valid. By the time you stop and rebuild all the image caching/media pieces, you'll end up with a hefty amount of memory usage too - Telegram (not the Qt one, the Cocoa one) will regularly climb up to 200ish MB if I have a media-heavy chat going. People have skewed ideas of what's doable in memory constraints in 2019 for the feature sets that customers tend to expect.
- candiodari 7y agoYou're comparing absolute minimum of slack with a very heavily used Telegram instance. This is, given the similarity of the apps, not fair. Compare a "media-heavy" slack with that Telegram, or compare with Telegram minimum.
- Klonoar 7y agoNo, I'm comparing the baseline: Slack's feature set. To support that, you'd need far more than a "Hello World" stack.
- saagarjha 7y agoThe "Cocoa" Telegram is not really Cocoa at all :/
- 7y ago
- floatingatoll 7y agoI checked in Firefox and a given Slack uses 200+MB at load and then optimizes down to 140MB at runtime for a given Slack, of which ~60MB is JavaScript and ~80MB is page elements. So if those numbers carry over to Electron-Chromium, then it's 100MB of "I'm a browser" and 140MB of "I'm a webpage full of dynamic and objects". They certainly will not carry over precisely equally, but it puts some scope on it to consider. (Gmail uses 250MB at runtime in the same Firefox instance, for comparison; I didn't test it in an Electron-like container.)
- chrismorgan 7y agoWhen comparing Electron and non-Electron, bear in mind that Chromium typically uses a fair bit more memory than Firefox; I’d estimate 20–40% as a rough figure, though it depends on all sorts of factors. You pick Gmail as another example. Gmail is a memory hog and fairly slow. For comparison, Fastmail (which company I work for) tends to use 10–15MB in Firefox for slightly different functionality (no chat, and I estimate the Hangouts widget to be about half of Gmail’s bloat, but on the Fastmail side you can load the calendars, contacts and settings modules in the same document comfortably without breaking 20MB), and is a good deal snappier. It comes of careful engineering with performance as a priority, and a small team. Slack is simply atrocious in these regards. Painfully slow, utterly greedy for memory. I often run it in Firefox rather than standalone to keep its memory footprint down. Whichever way I do it I regularly find it to have crept up over a gigabyte of memory, on my single workspace.
- bhl 7y agoWhy does slack and gmail use so much memory? It feels like it shouldn’t be an intensive process to display messages. Sidenote I don’t have much front end development besides basic web pages.
- floatingatoll 7y agoYou can browse their memory usage in rather explicit detail about Firefox about:memory, but that assumes a rather high level of preexisting knowledge.