9 ms·
When these kinds of things come up there's often complaint that desktop apps running in the browser are inefficient. As it happens, I agree. An old favourite of
by afandian 9y ago
When these kinds of things come up there's often complaint that desktop apps running in the browser are inefficient. As it happens, I agree. An old favourite of mine, Adium, probably never used 600 MB because I'm pretty sure my PowerBook G4 had less RAM than that.
But I think it's a mistake to jump to the conclusion that these apps should be written in a native framework rather than a web view. Slack is doing much more than Adium: web previews, document previews, pulling in pre-rendered fragments from the server and modular stylesheets. I wonder how much RAM Adium would have used to do the same things, and I wonder how much time the developers of an equivalent cross-platform app would have spent if they had been split trying to optimise lots of different platforms. They would essentially be re-inventing a modular layout and rendering engine (aka a web browser).
I don't know what the answer is. Maybe the detractors would prefer that the app did less. I know I'd prefer not to have previews and emojis, but I'm sure my colleagues find them useful.
(EDIT: Per reply below, turns out Adium did use a web view for presentation!)
- wlesieutre 9y agoIf I’m not mistaken, the actual chat contents in Adium were rendered with web views, and its configurable message styling was done with HTML/CSS. The whole program wasn’t stuffed in the web view though, it was a presentation layer on top of a native backend. EDIT- here’s a source on that http://meyerweb.com/eric/thoughts/2005/12/19/adium-chatting-with-style/ http://meyerweb.com/eric/thoughts/2005/12/19/adium-chatting-...
- saagarjha 9y agoYes, this is what the native macOS Messages.app does as well. On my Mac, with relatively heavy usage, I'm at around 100 MB of RAM.
- wlesieutre 9y agoIt clearly works pretty well that way. Textual (Mac IRC client) is the same setup. Slack, on the other hand, feels like JavaScript frameworks piled three or four deep, often getting its UI out of sync with the actual state. Chats/channels will briefly flash (1) unread in the sidebar to tell me about my own message that I just sent, or I’ll continue to have a blue “10 new messages” banner in a conversation that I’m actively participating in. I use it because it’s convenient, but there’s definitely room for improvement.
- orbitur 9y agoWow, that's crazy. The iOS Messages app is native. I'm only familiar with iOS development... is AppKit that bad?
- saagarjha 9y agoUIKit is noticeably better than AppKit but I doubt this is the reason why Messages is webview based. I don't know the exact reason behind it, but my guess is that they stopped caring about updating it when the people working on it either left or moved over to other projects.
- smashingfiasco 9y agoI've taken that same guess after the new fancy effects and animations for iMessage got fully implemented in iOS 10 and barely supported at all in macOS Messages. It seemed like an afterthought on the Mac.
- kitsunesoba 9y agoYes, this is accurate. Adium’s message views were almost entirely HTML and CSS with very little JavaScript. The bulk of Adium’s “brains” were written in Objective-C (and plain C, via libpurple).
- afandian 9y agoWell! You learn a new thing every day.
- Klonoar 9y agoI'll second this and note that Telegram, an app actually written in native code, is currently using ~500MB on my machine right now. I hate to be the one to say it (mostly because I just don't care about the ensuing argument), but I think most people who decry Electron/et al don't actually have that great of an understanding of how memory works. I say this as a guy currently sitting here writing an iOS/macOS app in Objective C by choice. Also, to echo your point: yes, the amount of free stuff you get in a web browser would be an absolute nightmare to reproduce in some native code environments (especially cross platform). The only reason I'm still wary of running any Electron app for long periods of time is because I do end up feeling the same sluggishness that I feel with Chrome open after awhile, and I don't think there's much that can be done about that. With that said... I've been using sluggish apps since the Windows 98 days, this isn't a new concept.
- saagarjha 9y ago> Telegram, an app actually written in native code, is currently using ~500MB on my machine right now. I took a look at the Telegram source code right now, and…I'm not impressed. It appears to be written without a real knowledge of how Swift or Cocoa works, has no consistent style, and seems like it reinvents significant portions of standard APIs. Like anything, the benefits from migrating to "native" only work if you actually utilize it correctly.
- Klonoar 9y agoMeh, there's often reasons to reinvent a portion of an API. You'd need to be more specific about what you see there that's an issue. I also pointed out Telegram because people, consistently, in every one of these threads, trot it out as an example of a native chat app (I don't count the Qt version in any of this, because it does not in any way feel native on macOS). To be honest, I welcome anyone to point out a competing cross-platform chat application that does almost as much as Slack does and doesn't eat up memory.
- rosser 9y agoNo-one else doing it "right" is not an excuse for anyone to do it "wrong". EDIT: Leaving aside the question of whether the other multi-platform messaging apps also do it that poorly, and merely running with your assertion to that effect. I have neither the time nor the inclination to gather data on that question.
- amedvednikov 9y agoThat's why I'm developing eul, a lightweight native desktop client for Slack, Skype, Facebook etc: https://eul.im https://eul.im It's only 4 MB and handles tens of thousands of Slack messages in one chat without lag. 1.0 release is going to be out in early November.
- avtar 9y agoThis sounds promising :) Btw, you have a Gmail icon on your site -- I'm assuming that implies Hangouts support?
- amedvednikov 9y agoThanks! :) No, it supports Gmail via the Gmail API. Soon it's going to have a full email client built in.
- tstieff 9y agoOne thing that concerns me about any 3rd party chat application is that it's difficult to know if my data is secure. Any thoughts on open sourcing your application?
- amedvednikov 9y agoYes! I want to make it open source, from my experience that's the best option for all parties. Unfortunately it won't be possible to open source some parts of the app. I'm setting up a company right now to increase trustworthiness. Like the home page says, no data will ever be shared with anyone and soon it will be possible to verify this.
- criddell 9y ago> Unfortunately it won't be possible to open source some parts of the app. Why is that? Are you licensing code from somebody else?
- AckSyn 9y ago
- nerpderp83 9y agoYou are making a false assumption that more features is something like geometripential in the amount of memory it should use. It is a list, with some images. They have Rubegoldberged themselves into some Sisyphusian box of poo while they expect us to row the SS Honeybucket to work and back. You know what my solution is for when I need to slack? I RDP to a VM running Slack. Mother of Lord! How about Slack sell lil USB ARM computers, like a chromebit that just runs Slack? Maybe I could pair them with my Snapchat glasses! Modular, yes you can!
- ThrowawayR2 9y ago> Maybe the detractors would prefer that the app did less. Sorry, that argument just does not hold water. On my Mac currently, MS Outlook is using 483 MB versus Slack using 704 MB, with just one tab open. For all of Outlook's bloat, one can hardly say it does less than Slack; it's just a glorified chat app for pity's sake. Even IntelliJ is using only 2x as much RAM as Slack with 4 medium sized projects open and IntelliJ is orders of magnitude more complex than Slack.
- pwnage 9y agoYou're wrong. Slack is doing much more than Outlook.
- FanaHOVA 9y agoYea a glorified chat app with video chat, audio chat, screen sharing and screen takeover remotely, file uploading, 3rd party integrations doing multiple things depending on your team setup, etc. I'd hardly call it a glorified chat app.
- saagarjha 9y agoMessages.app does all of those and uses a tenth of the RAM.
- mantas 9y agoThere're IRC clients that do half of that (unless IRC got audio and video support at some point) using < 1% of RAM or CPU...
- hatsix 9y agoYeah, but it doesn't run on my PC, or my phone, or in a browser.
- saagarjha 9y agoI don't need it to run in a browser or PC, and it works on my phone since I have an iPhone. You needs may vary, in which case you might just stick to SMS which is cross-platform and lightweight.
- lobster_johnson 9y agoDoes Slack actually render any externally-provided HTML? Last I checked, they had full control over all the rendered content, including the snippets that show up when you paste, say, a YouTube video. They do use HTML UIs here (e.g. the embedded YouTube player), but is this stuff coming directly from the upstream source or from Slack? I would hope the latter. After all, it seems you can paste a direct link to a video file (e.g. .mp4), and Slack renders its own video player. I never understood why Slack didn't spend their many billions of cash rewriting the desktop app with something like React Native. Even if they do need to render third-party snippets, they could still embed web views for those instances, which should hopefully be in the minority.
- zokier 9y ago> I know I'd prefer not to have previews and emojis, but I'm sure my colleagues find them useful. Of course if we'd use an interoperable standardized protocols instead of walled-garden apps, then your colleagues could have their cake and you could eat yours too by allowing everyone to choose a client based on their preferences.
- kodablah 9y ago> Maybe the detractors would prefer that the app did less I would. Unfortunately with these browser-based app solutions, rarely are features and resource usage proportional. Therefore, runtime configuration doesn't help that much. I personally would like to see Chromium take a more staunch approach at memory reduction.
- jorvi 9y agoWhatsApp web and Telegram do much of the same (well, besides the WhatsApp web app being nothing more than a front end to your phone as backend) yet WhatsApp uses 500mb.. Telegram (the native macOS that is) consumes around 100mb. So yeah, Electron is bad.