6 ms·
I'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
by Klonoar 9y ago
I'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.
- didibus 9y agoNo one else doing it right can be an argument to show that its because no alternative is much better, and so Electron is actually the possibly right choice. It still being too slow or memory hungry for your liking still remains though. But it seems that there might not be an obvious solution to this that does not compromise on features.
- rosser 9y ago"No better alternative" != "right". As you observe, a compromised choice is still compromised.
- didibus 9y agoAll software engineering choices are compromised choices made from carefully considered trade offs. To argue they made the wrong choice, you have to show they made the wrong trade offs. I understand you mean the user experience is still not ideal, but when would it ever be? When will performance or RAM usage be "ideal"? What does that mean? Should it compute in 0ms and use 0% RAM? There is no right ideal, or true ideal. The idea of an ideal is itself a choice of trade offs. Your ideal could be that you absolutely need under 20ms response times on all UX actions, while never exceeding 100mb RAM. And that could be ideal for you, but might still not be the right ideal for me, hoping to run it on a modded gameboy hardware. And if that was the case, can you compromise on feature? If not, and its not currently technically possible to achieve your performance ideal and have parity of features, then what? Is the right choice then to not release a desktop client for slack at all? So if you know a way to achieve your ideal, then you can propose that alternative, and you can say, here is how, without much more cost of development, you can achieve X, Y, X improvement on performance while keeping all features. But, if you do not know, and have no known examples, it could indicate that it is not currently technically known how, and thus impossible with the current hardware and software knowledge at hand. I'd also say that in the case of Slack, their ideal is probably defined more in terms of profits. So it could be said to be the right choice, simply because of how popular their service is and has remained, even though they picked Electron for their desktop client.
- jackson1way 9y agoI'd challenge that. I have been using the Telegram native client on Windows since ~3 years and I don't remember having it ever going beyond 100 MB usage of RAM or ANY spikes in CPU usage (usually ~60 MB and 0% CPU). It usually sits there, quietly. Maybe its using more RAM when I take a call with it, but since its going back to normal after I finish (or it's always just low), it doesn't matter. I am using Slack since more than 3 years too. I have tried their web-app, desktop client, iOS app, everything. The iOS app is pretty good and gets constant love. Both the web app and desktop client are pretty much equal in performance: laggish and slow. My laptop has only 8 GB RAM and a 3-4 years old CPU. The next Lenovo I'll be getting is available with max. 16 GB RAM. I have switched to the web app in my Chrome since ~2 years, because after all, the desktop client does eat more RAM, since it will have 2-3 extra processes, whereas running as a Chrome tab, those processes already exist anyway (i.e. GPU process). To have the Slack tab always open as a single dedicated window, without the toolbar and tab bar etc. I use this as a bookmark: javascript:(function(){window.open('https://your-company.slack.com', 'Slack', 'scrollbars=no');;})(); I am also using the WhatsApp web app (also tried their 'desktop client' for a while), it's about the same experience as with Slack. Crappy. Coming all the way from ICQ, IRC, Miranda etc. Telegram is the best chat client I have ever been using. The iOS app is great and about the same quality as the WhatsApp app (which is maybe slightly better), but since most of the time I'm infront of a real keyboard, I'd rather use the desktop client, which is just really snappy. The product design comes close to Apple products. All the drag&drop features, selecting of multiple messages/pictures, search, hotkeys ... Someone really did an effort and thought about all these small details. You can't imagine how easy it is to show all sent photos, easily browse through all of them with hotkeys and they show up instantly, or show all sent URLs, and so on. It is so good, that many times, I'd rather get up from the sofa and sit down at my desk to type a 2-3 sentence message to someone, than using my iPhone (WhatsApp or Telegram or iMessage). Oh and it has bots! I actually did one! Announcing delays and stuff for public transport in my town, using a server with php that is doing all the web crawling. I'd never even think about doing that in Slack.
- Klonoar 9y agoAahhhh, I just saw this, sorry. I'm happy to be wrong! I think one thing that sucks about these discussions is that everyone gets different results on their machines and it's difficult to pinpoint why memory usage might be so high - e.g, I have a slew of cryptocurrency chats open, so maybe Telegram is just doing that much more work or something?