10 ms·
I really hope whatever the NativeWindow changes are allow Slack to finally stop rendering when the app goes to the background. My battery has been killed a coup
by seanalltogether 8y ago
I really hope whatever the NativeWindow changes are allow Slack to finally stop rendering when the app goes to the background. My battery has been killed a couple times by the Slack renderer using ~30% cpu playing gifs while the app isn't visible, and their support says its because they don't have a notification hook for minimizing
- mkonecny 8y agoWhy is it taking 100% CPU to play gifs?
- seanalltogether 8y agomaybe not 100% from doing a quick test, more like 30% nowadays but that can use up power quick still
- LeoNatan25 8y agoChromium is notoriously slow at rendering GIFs. It used to be faster than Firefox, but years ago it went downhill. On a forum I visit, people would basically troll Chrome users by posting hundreds of animated smilies. On Firefox and Safari, there is little effect, while it chugs Chrome down to a halt.
- Razengan 8y agoIs writing native apps honestly still so hard these days? I can appreciate the concerns about maintaining multiple codebases and dealing with different delivery mechanisms and their rules, but modern iOS/macOS and Windows APIs (at least; I cannot speak for Android and Linux) seem just as easy, let you work in arguably better languages, evolve at a faster rate, and provide a better experience for users and their machines.
- LeoNatan25 8y agoShsh, or you’ll burst the web “devs” bubble of “write once, run nowhere, rewrite multiple times, run like shit here and maybe there”.
- pvg 8y agoIt's still about twice the work. Or n-times, for n platforms.
- enraged_camel 8y agoTwice the work for front-end only, and even that is arguable. The overall logic of the client across different platforms will be very similar. The only thing that will change is language and implementation details.
- pvg 8y agoDifferent environment, different conventions, different bugs, different design, different support, different everything. Different teams that have to communicate. It is 'arguable' that it's twice the work, that is true. Twice is the lower bound.
- babypuncher 8y agoThere are options that let you write the bulk of your code in one language then code platform specific user-interfaces against that library. This is basically the Xamarin philosophy for iOS/Android development, and Xamarin apps generally offer a much better user experience than these web-app wrappers cluttering the App Store.
- pvg 8y agoWe were talking about desktop apps in this case. It's slightly different on mobile but the parameters are similar. The range of options here involve fiddling with dials that affect cost and quality. The comment I'm replying to amounts to 'why not pretend these dials don't exist?'. The answer is, because they're really there, you can't effectively plan development like that.
- h1d 8y agoYes. It's typical for a team to have different people handle different platform and spreading task on multiple people suddenly slows down the progress than letting 1 set of people handle the front end.
- geodel 8y agoIt is. Especially for multi billion dollar companies with 100s of developers. Because you know careful evaluation, strategic direction, ROI etc has shown users prefer to update their own hardware instead of demanding companies to write efficient software.
- JakeTyo 8y agoIf it's hard for a dev to write a native apps, then maybe they should re-evaluate their career choices and leave it to the competent ones.
- hnbroseph 8y agoor, everyone can do whatever they want. i like that a bit more. :)
- orange8 8y agoIf the "competent ones" have to resort to bitter FUD wars to protect their turf, then maybe they are the ones who need to re-evaluate their so-called careers. Somewhere out there, there's a bitter COBOL developer still complaining about that "new fangled" c++
- mikhailt 8y agoIt's not writing the native code that's the problem, it's designing the same GUI experience across platforms that's nearly impossible to do. If it was so easy as you said, a lot of macOS apps would've been portable to Windows years ago given the market share. I work for a cross-platform company, Windows is a much more difficult to develop for compared to macOS. You can write a Cocoa UI but what do you do on Windows when you need to support Windows 7 and above? Win32 controls are grossly outdated but the best accessible/consistent experience across multiple versions, UWP controls is limited to Windows 10 and best under MS Store, WPF has been neglected but so far it is the fastest way to develop a GUI. Microsoft has decided to split UWP out of Microsoft Store to bring it to everyone with UWP XAML Islands etc. The reason Slack prefers Electron is because you can just write the same HTML/CSS front-end, deploy it, and all Slack apps can simply be refreshed to show the newest UI. You cannot do that with native apps at all. You could get around with a few webviews embedded in the native apps but might as well go full Electron.
- CyberDildonics 8y agoEquating electron and cross platform is a gigantic fallacy. Qt and other GUI frameworks (like Juce and FLTK) exist and are blisteringly fast. You don't have to package an entire web browser to make something cross platform.
- chris_mc 8y agoQt, or whatever, isn't pretty enough for the designers.
- api 8y agoYes. At least N times the work for N platforms. Fewer developers, harder to recruit. Cross-platform options like Qt are not modern/pretty enough and sometimes aren't that much thinner than Electron (depending on how well written the app is). Java/Swing/SWT is also quite bloated and looks terrible. Development is much slower in languages like C++. Other languages are not cross-platform or have immature/buggy cross platform support. How's ObjC on Windows? C# on Mac? They exist, but nobody uses them. I really think we're in a UI dark age. Native UI development has gone backwards compared to the ease of WYSIWYG GUI design 10-20 years ago. Go back and use the VB.NET GUI builder from 2004 and be in awe at the incredible productivity you could achieve. Platforms are more fragmented today too. There is even fragmentation on the same platform! Do I use Qt or GTK or (insert one of a dozen others) on Linux? WPF or Windows Forms on Windows? Cocoa or UIKit on Mac? Which one will MS or Apple kill tomorrow? ... or I could just say fXXk it and use Electron and be done with it. This is 100% the fault of vendors. If you hate the bloat blame Microsoft, Apple, and Linux developers, not people who use Electron. Edit: mobile UI development is less fragmented but it's not really that great either. You get no choice in dev tools and the code is absolutely unportable. I see higher-level web or web-ish views/libraries/frameworks taking over there too. It's already happening.
- AnIdiotOnTheNet 8y ago> Go back and use the VB.NET GUI builder from 2004 and be in awe at the incredible productivity you could achieve. That almost nothing like this exists today is evidence that personal computing is dying, IMO. Companies don't want to empower users, they want them to be good little content consumers who do what the ads tell them. Developers (OSS developers included) don't respect them and assume they're too stupid to be permitted to use anything but the safety scissors. After all, if they were worthy of creating things they'd be C greybeards.
- scarface74 8y agoI haven’t done any desktop GUI development since VB6 and I only used .Net Windows Forms for Windows Mobile up until 2011. What is the modern drag and drop method to build GUIs on Windows?
- AnIdiotOnTheNet 8y ago> provide a better experience for users and their machines Ah, but you see, the modern developer does not care about the user experience. "Developer time is worth more than user time", "move fast and break things", etc. Users are the cattle we feed ads to and farm for salable data.
- Spivak 8y agoThe modern developer very much cares about user experience which is why the gold standard right now is pixel perfect feature perfect cross platform apps for web mobile and desktop.
- giancarlostoro 8y agoAssuming they update soon enough I suppose. I find using the browser window for Slack is easier, the main browsers I use let you pin tabs so it's even easier, plus I can put a darker theme on Slack, so sick of the bright white background.
- Rjevski 8y agoI always recommend using the browser because you're likely to have one open anyway, so you might as well reuse that (and save resources) than run another one.
- Brakenshire 8y agoAre there any browsers which allow you to do your own electron-like wrapping of webapps? Would be nice to have your own native icon etc, but also be able to tune exactly what behaviour you want, for instance set per app caching levels, cookies, what happens when it goes to background, etc. A good example is on mobile, where playing media on the web is a hassle because you never know what the background behaviour will be, whether it’ll carry on playing when you’re on another tab, or on another app, or with the screen off, or after five minutes. It seems to be a free for all now for the browsers, not much user control.
- Rjevski 8y agoFirefox used to support this but they nixed it (but hey, they gave us Pocket instead, yay! /s)
- giancarlostoro 8y agoSeems to have a bugzilla ticket: https://bugzilla.mozilla.org/show_bug.cgi?id=1407202 https://bugzilla.mozilla.org/show_bug.cgi?id=1407202
- jsjohnst 8y ago> Are there any browsers which allow you to do your own electron-like wrapping of webapps? FluidApp[0] should work great and I bet there’s even a userscript already to handle desktop notifications. [0] https://www.fluidapp.com https://www.fluidapp.com
- dawnerd 8y agoYou can kinda disable gifs by going to preferences > Messages & Media and unchecking "Show images and files from linked websites". Doesn't get them all but it really helps.
- baxter001 8y agoLooks like the BrowserWindow events at the js api level are unchanged for the past two years. Here's hoping something deeper was broken about them that now drastically changes top-level api behaviour!
- stefan_ 8y agoI want to work at a company like that, where I can just blame the "stack" we're using and shrug my shoulders.
- comboy 8y agodo you really though
- benbristow 8y agoIf it makes for easier programming, yes. Writing Slack as a native app would be a massive pain. Especially due to all the web-like features it has, the fact that it's one codebase (mainly) for desktop and web. They also have to support Windows, Linux, Mac and mobile. Not an easy task
- LeoNatan25 8y agoFor a billion dollar company? Give me a break.
- true_religion 8y agoSlacks annual revenue was 200 million in 2017, when they were a 5 billion dollar valued company. 200 mil is just 1000 Bay Area salaries, and they do have other budget items. Its entirely possible that they cannot fund 5 native development teams, while building their core features to justify their valuation, and paying their sales and marketting team to actually generate revenue.
- CyberDildonics 8y agoI legitimately can't tell if you are joking.
- LeoNatan25 8y agoIt does sound like a joke. It also ignores that fact that other, proper, multiplatform technologies exist that still produce a far superior end result for the user even if not 100% platform guidelines/conventions compliant.
- 43920 8y ago> their support says its because they don't have a notification hook for minimizing That doesn't even seem correct - the BrowserWindow emits "hide" and "show" events [1] that Slack could use to do exactly what you're describing. I'm guessing they just don't want to implement it for some reason? [1] https://electronjs.org/docs/api/browser-window#event-show https://electronjs.org/docs/api/browser-window#event-show
- brazzledazzle 8y agoI’m guessing they meant visibility (which minimizing can effect) but it depends on what they mean by “background”. Sounds like that’s only reliably available on macOS: “Additionally, on macOS, the visibility state also tracks the window occlusion state. If the window is occluded (i.e. fully covered) by another window, the visibility state will be hidden. On other platforms, the visibility state will be hidden only when the window is minimized or explicitly hidden with win.hide().”
- pacifika 8y agoFWIW I disabled animations in the slack settings and the difference is night and day.