News for hackers. Stuff that matters.
Re:Creating a Slack app that uses fewer resources by anaisbetts on Sunday October 11, 2020 @05:04AM (#24744591)
In this screenshot, this app is using 286MB of memory and the official Slack app is using 200MB, how is this better?

fwiw, this is how the original Slack Mac app worked and it sucked. We had to tell users to upgrade their OS so that their app worked, because NSWebView (and WKWebView) are tied to the OS release. If their computer was too old, telling a customer to Buy a new Mac is a pretty terrible experience.

Re:Creating a Slack app that uses fewer resources by helge5 on Sunday October 11, 2020 @07:54AM (#24745177)
My primary goal for Shrugs wasn't better memory efficiency but a better user experience (i.e. using native controls, having multiple windows, quicklook, etc). It uses quite some memory because it does (too) aggressive caching and prefetching of messages (I have enough RAM, fast access was more important to me).

It is worth noting that the official Slack app has gotten massively more memory efficient about a 1.5y ago, its bad reputation comes from the time before that (when it easily used more than 1GB of RAM). (I think it still has other performance issues, but they aren't as big anymore, it is doing quite well IMO)

Having said that I'm working on improving memory consumption in Shrugs.app - it is a tentpole feature planned for v1.1 (it'll take some time until this will be ready though).

Re:Creating a Slack app that uses fewer resources by helge5 on Sunday October 11, 2020 @08:02AM (#24745207)
Oh, the original comment was about the WebKit wrapper. Well, that this is using as much memory isn't very surprising. Why would Slack use less memory in a WKWebView than in an Electron frame? It is essentially the same app (with the Electron app providing a set of extra platform integration benefits).

Any performance differences between the two approaches should essentially boil down to the Chrome vs Safari differences.

Re:Creating a Slack app that uses fewer resources by saagarjha on Sunday October 11, 2020 @01:43PM (#24747579)
Safari happens to not be an absolute RAM hog ;)
Re:Creating a Slack app that uses fewer resources by pdimitar on Sunday October 11, 2020 @08:07AM (#24745226)
Just looked up your app. Love the idea but still too many features missing, especially editing messages.

I'll keep an eye on it. I have no problems buying after it gets good enough. Thanks for your work.

Re:Creating a Slack app that uses fewer resources by helge5 on Sunday October 11, 2020 @08:28AM (#24745327)
Thanks! Yes, it is very 1.0 and lacks quite some features. Message editing falls in the same batch of work like the RAM improvements and will very likely be part of 1.1.
Re:Creating a Slack app that uses fewer resources by masklinn on Sunday October 11, 2020 @07:00AM (#24744947)
> In this screenshot, this app is using 286MB of memory and the official Slack app is using 200MB, how is this better?

Yes not sure where they got the 1.2x ratio in their favor, although if we're only rounding to the nearest unit the official slack uses 220MB, not 200.

TBF the machine has plenty of memory available, so trading some memory for less CPU time, less GPU time, better idling and faster startup seems… a pretty good tradeoff.

The one thing I'm doubtful of is whether the official slack application really does nothing but wrap the webapp with no additional functions?

Re:Creating a Slack app that uses fewer resources by sriku on Sunday October 11, 2020 @08:49AM (#24745427)
> the machine has plenty of memory available

On my MacBookAir with 4GB of RAM, Gmail+GCalendar+Slack+GChat+Trello+Docs is enough to put memory pressure on the system. Gmail+Calendar alone end up taking up 1.5-2GB after a while. No respect for memory.

Re:Creating a Slack app that uses fewer resources by devwastaken on Sunday October 11, 2020 @11:27AM (#24746426)
No one should subscribe to building software for a purposefully underpowered and outrageously overpriced computer. You have the responsibility to have better hardware than a 2005 pc.
Re:Creating a Slack app that uses fewer resources by nemothekid on Sunday October 11, 2020 @10:05PM (#24750800)
You think 4GB was anywhere near common for a 2005 PC?
Re:Creating a Slack app that uses fewer resources by anaisbetts on Sunday October 11, 2020 @08:13AM (#24745255)
It does not - the Slack app injects extra APIs into the DOM, and the Slack webapp recognizes it's being loaded in the Desktop app and adds additional functionality (the Downloads pane for example)
Re:Creating a Slack app that uses fewer resources by hkgumbs on Sunday October 11, 2020 @11:57AM (#24746650)
Author here—that's pretty embarrassing, and I'm not sure how I messed that up. I do recall having to retake the Activity Monitor screenshots between drafts, so I'm going to blame my mistake on that. Adding an editorial note now!