News for hackers. Stuff that matters.
Re:Migrating Slack's Desktop App to BrowserView by Klonoar on Monday October 30, 2017 @01:44PM (#15587173)
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.

Re:Migrating Slack's Desktop App to BrowserView by saagarjha on Monday October 30, 2017 @01:56PM (#15587299)
> 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.

Re:Migrating Slack's Desktop App to BrowserView by Klonoar on Monday October 30, 2017 @02:06PM (#15587387)
Meh, 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.

Re:Migrating Slack's Desktop App to BrowserView by saagarjha on Monday October 30, 2017 @02:30PM (#15587626)
> there's often reasons to reinvent a portion of an API

Yes, but I don't feel that a message app really needs to do this to the extent that Telegram does–they've managed to make their app look out of place on macOS.

Re:Migrating Slack's Desktop App to BrowserView by Klonoar on Monday October 30, 2017 @02:53PM (#15587827)
Mmmm, that's really vague though - what exactly feels out of place? The only applications I use on a daily basis that feel like they're "Mac" are Safari, Messages, Xcode, and I guess Finder... all of which are built by Apple. Maybe Paintcode counts too?

The rest of the apps I find myself using don't use those same UI/UX patterns/designs, and I don't think it matters that much: Photoshop, Terminal, Telegram, Bear, Fantastical... the list goes on. The applications that keep me coming back are the ones that are smooth and don't interrupt my train of thought (most everything here), or have some big use case (Photoshop) that keeps me coming back.

I'll also point out one more time that Telegram is what people bring up every time this discussion rolls around, so they're clearly doing something right and people must not think it looks _that_ out of place.

Hell, I'd argue that the consistency of UI/UX on Apple products matters more for the initial purchase and wow-factor than it does once a user has settled into their environment. Every application does not need to function and look exactly the same.

To be honest, this all feels like moving the goalposts, and is why I usually refrain from getting into these discussions.

Re:Migrating Slack's Desktop App to BrowserView by rosser on Monday October 30, 2017 @02:09PM (#15587419)
No-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.

Re:Migrating Slack's Desktop App to BrowserView by didibus on Monday October 30, 2017 @04:04PM (#15588401)
No 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.
Re:Migrating Slack's Desktop App to BrowserView by rosser on Monday October 30, 2017 @05:26PM (#15589035)
"No better alternative" != "right". As you observe, a compromised choice is still compromised.
Re:Migrating Slack's Desktop App to BrowserView by didibus on Monday October 30, 2017 @11:15PM (#15590869)
All 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.

Re:Migrating Slack's Desktop App to BrowserView by manigandham on Tuesday October 31, 2017 @05:59AM (#15592014)
Nothing is perfect, every choice is a compromise. As a company, there are limits to how much time and effort is spent while growing their business. How much RAM is used is very low on the list of considerations.
Re:Migrating Slack's Desktop App to BrowserView by rosser on Tuesday October 31, 2017 @12:05PM (#15594254)
I would be fine with the amount of RAM used, if Slack didn't also materially reduce my battery life, by keeping my CPU — and fan — spun up. Charge-discharge cycle counts are a limited thing. They're directly shortening the lifespan of my hardware, doing that.
Re:Migrating Slack's Desktop App to BrowserView by manigandham on Tuesday October 31, 2017 @12:52PM (#15594655)
Is that really your argument? Slack has a material effect on your hardware life - as opposed to all the other usage? Is slack the only thing you're running?

Why not just use another tab in your existing browser then? Or another service entirely?

Either way, it doesn't change anything in creating a widely used application for the least amount of time and effort. The vast majority of their users will not care or even notice if there was a more efficient native app.

Re:Migrating Slack's Desktop App to BrowserView by rosser on Tuesday October 31, 2017 @01:12PM (#15594804)
It is the only thing reliably using 10-20% of my laptop's CPU, while idle. Having the Slack iOS app even open drops my battery at least 10%/hour. Even Facebook's app or using a mapping app, actively listening to the GPS birds, don't do that.

My employer dictates the choice of communications tool. I don't just get to "pick another service entirely."

EDIT: And their site's 2FA (which I'm required to use, because $work) also reliably gives me "too many login failures" on the first login attempt, so using it in a browser tab is a non-starter, even without also losing desktop notifications.

With the amount of money they've been given, both by VC and by customers (I know what we pay them per month, and although we're not a small company, we're far from their biggest customer), this quality of software and service is absurd.

Re:Migrating Slack's Desktop App to BrowserView by jackson1way on Tuesday October 31, 2017 @06:41AM (#15592172)
I'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.

Re:Migrating Slack's Desktop App to BrowserView by Klonoar on Tuesday October 31, 2017 @11:08PM (#15598554)
Aahhhh, 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?