Lurker News
Modern browsers these days are powerful things - almost an operating system in their own right. So I'm asking the community, should everything now be developed as 'web first', or is there still a place for native desktop applications?

Comments (752) 155 threads

Show all comments

Showing thread 3 of 155

ilrwbwrkhv8 replies#
Every single app that I use, I try and make sure it is native. I shun electron apps at all cost. It's because people who put in effort to use the native APIs put in a lot more effort in the app in general based on my anecdotal evidence. It is also more performant and smaller in size, things that I cherish. It also pays homage to limits and striving to come up with new ways of overcoming them, which hackers would have to do in the past. I don't think not worrying about memory, CPU, etc are not healthy in the long run. Slack desktop app is almost 1 gig in size. That is crazy to me, no matter the "memory is cheap" mantra.
airstrike#
Bonus points if it includes offline documentation. As nice as it is to have "updated" online docs, the reality to me seems to be defined more by broken links than by actual up-to-date documentation.
ttoinou2 replies#
1 gig for Slack ? I count < 300 MB on my Windows C:\Users\[MY USERNAME]\AppData\Local\slack counting app-4.5.0 and packages folder

And currently taking < 300 MB RAM

developerdylan#
185MB on mac.
jbverschoor#
"storage is cheap"

"memory are cheap"
"cpus are cheap"
Say the same people who spend a million on AWS every year

SllX2 replies#
Agreed. If you have a CPU from 2012 onwards, 16GB of RAM and an SSD, that’s a respectable hardware setup. It might not be the fastest piece of kit on the planet, but I don’t see any reason why it couldn’t last another 3 to 5 years without feeling slow.

Electron apps invariably make such kit feel slower than it actually is. You can get good performance out of even older hardware if you treat it well and load it with good software that respects the hardware.

toomuchtodo#
I type this from a 2014 MacBook Air with 8GB of ram, still going strong, no upgrades except a battery replacement. Everything is still as snappy as the first day I got it.

No electron apps!

dx872 replies#
Yep, the new Steam library being a bloated web app is what forced me to install more RAM. I normally don't close out of applications when I'm not using them, so I was always hovering around ~6-7 of my 8 gigs of RAM in use. Then they update the library to the new bloated version, and my computer starts freezing because the library memory footprint is so much larger that my computer was having to use over a gig of swap space.
karatestomp1 reply#
I have a rig powerful enough to run a lot of last-gen games at 4K with high quality settings, and a lot of current-gen ones at mid to high settings and 1080p. The fucking redesigned Steam library lags, none of the animations (why does it need animations?!) are even close to smooth, and there's massive delay on every input. I've never once encountered a move toward webtech, or toward heavier and "appier" JS use in something that's already webtech, and gone "oh good, this works much better now, I'm so glad they did that."

Continue this thread — 1 reply

biggestdecision#
>I normally don't close out of applications when I'm not using them, so I was always hovering around ~6-7 of my 8 gigs of RAM in use.

That sounds like your problem. And I refuse to believe that the new steam UI uses 2gb of memory.

ryukafalz#
I agree, in part because of performance, but also in part because I value being able to bootstrap from source as much as possible. There are only a few projects seriously working on this, one being GNU Guix: https://guix.gnu.org/

The trouble with Electron apps though (and most Node apps) is the sheer number of dependencies. It's just infeasible to package them for a distro if you care about their dependencies being packaged as well - at least, not without the entire process being automated.

egypturnash2 replies#
Slack desktop app is almost 1 gig in size.

On a whim I just checked how big the copy of Adium still lingering in my Mac is: 60 megs.
And Ripcord (a native discord/slack client) is a mere 40.

lytedev2 replies#
ooh I'll have to check out ripcord!
thewebcount#
I use it daily. It's OK. It's better than having a full electron app/browser running, but it's fairly incomplete. (For example, in Slack I can't find a way to set my status.) I also have to reauthenticate every Monday morning which means launching Slack in a web browser to grab my credentials. It's a pain.
ivanfon#
I've found it's great for Discord, and pretty good for Slack (although I've been using Slack in my browser now that it's become critical during WFH).

Unfortunately it's proprietary, but there's another native client called gtkcord3 [0] that seems to be progressing well.
0: https://github.com/diamondburned/gtkcord3

DaiPlusPlus1 reply#
And Winamp is 4MB (after removing the stock plugins that I don’t need, like modern skins and the long-broken media library internet lookup stuff).

How big is Spotify now?

jleahy2 replies#
Spotify is 273MB (on Linux at least), 70MB for the binary and 137MB for Chrome, plus some other bits and bobs.

  $ pacman -Qi spotify
  Name            : spotify
  Version         : 1:1.1.10.546-4
  Description     : A proprietary music streaming service
  Architecture    : x86_64
  ...
  Installed Size  : 272.79 MiB
So at least it's smaller than Slack.
Harrrr3 replies#
I have a noob question, but how do proprietary apps (IE: Slack) make it onto the AUR without having an official binary?
detaro1 reply#
Both Slack and Spotify do provide Linux versions, even if not/less supported officially.

Continue this thread — 1 reply

dialamac1 reply#
There’s nothing to really block much on the aur. There are some guidelines in naming and no duplicates, no maliciousness etc that are enforced, but that’s it. But anyone can upload a build script (PKGBUILD) for anything.

If you want to see how it’s done search the package name and AUR and you can see the build script right on the website.

Continue this thread — 1 reply

kmarc#
There are many PKGBUILDs on AUR that cactually download rpm / deb packages and unpack the binaries and deps from it.
egypturnash#
iTunes, in all its bloated, much-maligned media-managing glory, is a mere 188 megs on my Mac.
BubRoss3 replies#
It is true that there is a a correlation between lower level programming and better programming in general. You probably won't see someone writing asm but creating crazy O^2 algorithms that run on every frame with memory allocations that run in the inner loop.

At the same time a native win32 program can pack significant functionality into a 20KB exe. Put these together and you have a program where everything is instant, all the time on any computer. The original uTorrent was just over 100KB and installed then ran in an instant.
These two refinements together are such a massive difference from any electron program that it melts my brain when people say that it isn't a problem to have a chat program feel like using windows 95 on a 386.
People say talk about needing cross platform programs, but something like fltk has everything most people will need and also runs instantly, while adding only a few hundred kilobytes to an executable.

ghettoimp2 replies#
I strongly disagree with the idea that lower level is better.

Yes, lower-level languages allow for programs with good performance, small executables, and so forth. There are many domains where they are clearly the way to go.
But higher-level languages allow for better safety, tremendous productivity, portability, exploration, and flexibility.
If you keep your data in an SQL database and you can easily query and update it in any number of ways that you didn't initially realize you wanted. If you instead keep it in hand-crafted C structs, you can probably provide awesome performance. for whatever you originally thought you needed. Once your needs go outside of that box, you'll have to spend significant development effort.
The correct choice depends almost entirely on the domain.

hootbootscoot4 replies#
How about "being aware of what your abstraction layers cost, and being palpably aware of every needless contortion you create"

know what everything does. call if from up on high? fine, but only if you literally can trace that high level call down to the machine code it emits :D C compiler suites can do that no problem "gcc -S mycode.c"
For an appropriate dose of humility, so that you know that I'm not elevating myself here, but pointing out reality, check out GCC or LLVM source code.
Something like Lua or Berkeley DB can be defined inside your program in a matter of a few hundred lines of included library code, but what does it DO?
Bringing SQL and a database on board is rather odd for a desktop app, wouldn't you say? Configuration should be flat files, ideally, or managed via the apps gui, in which case an embedded database like Berkeley DB is usually more relevant. Your mention of SQL smacks of "all things are nails, always use hammers", to me at least.
Have you worked with the actual computer itself in any capacity? I mean ASM, C, C++, etc, but essentially being aware of what an ABI is, what types actually are (memory shape patterns so we can define physical memory in terms of our data structures) Javascript is not computer programming, but rather programming the browser, or it's disembodied transplanted javascript engine. the animal is completely different from physical memory and actual instructions.
Computers essentially manipulate memory structures. The further away from this you get, the more likely that your abstractions will be leaky, not fit what computers are actually DOING with your data, and this results in beautiful script driving janky machine code.
Seriously, while we all like to pretend that everyone is equally special, let's recall that someone is a VBscript for Word expert, and that this is basically a virtual machine that itself is just defined inside someone elses program. Technological stacks are defined in terms of semi-arbitrary made-up things other people made-up and that you just need to know how to use.

Continue this thread — 4 replies

BubRoss#
You are arguing against a point I didn't make. I'm not trying to rehash nonsense language arguments. I'm saying that many times the easy electron route is also correlated with programming that gives poor performance even outside of electron functions.
usrusr#
Not sure that I entirely agree there: I could easily imagine someone writing too close to the metal to stick to list iteration where a hash would be better and so on, unless it's prohibitively slower, whereas someone slightly higher would freely choose whatever they feel appropriate for the situation. They might often guess wrong and take a structure that is overkill for the typical dataset but the penalty for that will be negligible compared to the one paid for using a badly scaling structure on way too much data.
dkarl1 reply#
> You probably won't see someone writing asm but creating crazy O^2 algorithms

I watched a lecture by Bjarne Stroustrup that he gave to undergraduate CS majors at Texas A&M where he coded a solution to a problem using linear scans and then a "better" solution using better algorithms with better big O performance.
Then he did something interesting. He did a test on a tiny data set to demonstrate that the solution with linear scans was faster, and he asked the audience to guess at what data size the more efficient algorithms would start to beat the linear scan. After the audience members threw out a wide range of guesses he confessed that he didn't know. He had tried to test it that afternoon, but the linear scans outperformed the "better" algorithms on any data set that he could allocate memory for on his laptop.
IIRC he finished by telling them that professionals often do performance optimization the opposite of how the books present it. Using an algorithm with optimal big-O scaling isn't the optimized solution. It's the safe answer that you start with if you aren't bothering to optimize. When you need better performance, you evaluate your algorithms using real data and real machines and qualify your evaluations based on the characteristics (size, etc.) of the data.

BubRoss#
You are focusing on an example and conflating it with the actual point that I'm making, which is that electron is not only slow, but compounded by slow programming in top.

That being said... I know exactly what you are talking about and it was always strange to me, because it was actually iterating through every time to find a value first, so the iteration through the linked list would always kill the performance. Even so, basic linked lists are practically obsolete. This is not a good example of algorithmic complexity, because the complexities were actually the same.

seventh-chord10 replies#
The " is cheap" mantra also really only makes sense if you are writing server code, where you yourself pay for all the memory your code will ever use. If you deploy code to a large number of users it makes little sense. If a million users start your app daily, and your app has a 5 second load time and uses 300mb of ram, you are wasting over 50 days of user time, and hogging close to 300 terabytes of ram.

Continue this thread — 10 replies

Continue this thread — 1 more reply