5 ms·
> Using a CDN-cached HTML file, a persisted Redux store, and a Service Worker, we were able to boot a stripped-down version of the client in less than a second
by choeger 7y ago
> Using a CDN-cached HTML file, a persisted Redux store, and a Service Worker, we were able to boot a stripped-down version of the client in less than a second (at the time, normal boot times for users with 1–2 workspaces was around 5 seconds).
Money quote right here. That is the price we all pay for the bloat in modern software development. Just because slack is either unwilling to, incapable of, or forced not to develop a true native version for let's say 8 different platforms, they are using an architecture that wastes insane amounts of resources and time.
- flohofwoe 7y agoNot trying to defend Slack or Electron here, but it's definitely not the case that native applications automatically start faster. Otherwise splash screens wouldn't be a thing, and those existed long before Electron (for examples of very long startup times, see Visual Studio, Photoshop, Autodesk Maya, Outlook, etc... the list goes on and on). And all those applications have slow UIs and eat tons of RAM too. The actual question is of course, why does something as simple as a chat client has to be so complex. Is a complete browser engine really necessary to embed images and videos?
- dspillett 7y ago> Is a complete browser engine really necessary to embed images and videos? No, but it is a "fast enough", well tested, well supported, regularly updated to address security issues, option that does the job, and the developers are already familiar with many of its ins-and-outs, and when a new display feature is needed it might just already be there. Any smaller alternative has to compete with all that. Who is maintaining it? With fewer people using it (as it is optimal for specific cases but less useful generally) is there the resource available to support it, and are issues even going to be noticed before you hit them? Electron is one of those odd things that is probably ideal for nothing, but is good enough for such a huge range of things, and is easily accessible to existing developers, that it quickly gained momentum, then ubiquity, and will likely keep both for some time to come. Not unlike Visual Basic, which was initially seen as prototyping system (my memory of VB1, its packaging and advertising, is that it was marketed as such) but turned out to be "good enough" for production use for many small apps & tools, and was more accessible to less experienced programmers than the other options for development targetting Windows. Similar arguments about its output hogging resources and having large distributables were made back then too: why does your simple calculator, slightly enhanced notepad, & other tools, need a 300Kbyte library to be distributed with each of them?!
- gtirloni 7y ago> The actual question is of course, why does something as simple as a chat client has to be so complex. Is a complete browser engine really necessary to embed images and videos? If you keep adding features, at some point you're going to re-implement a browser engine from scratch. So why not start with one in the first place?
- coldtea 7y agohttps://en.wikipedia.org/wiki/You_aren%27t_gonna_need_it https://en.wikipedia.org/wiki/You_aren%27t_gonna_need_it
- de_watcher 7y agoAnd when you think of the browser as what it is - a VM manager for a weird sandboxed OS, it's all starting to make sense: good old OS wars where the user pays for the damage.
- threeseed 7y agoYou're actually comparing apps like Photoshop and Maya with Slack ? Of course they use lots of RAM they do lots of complex things. Slack's only job is to print text on the screen and send text to a remote server. That's it.
- flohofwoe 7y agoI addressed that in the last sentence of my comment. But from what I've seen, most Slack channels contain more images, videos and animated emojis than text ;)
- The_rationalist 7y agothey are using an architecture that wastes insane amounts of resources and time Source? Are you talking about native performances vs electron performances?