Slack Engineering Icon Slack Engineering

When a rewrite isn’t: rebuilding Slack on the desktop  ↦

The Ship of Theseus is a thought experiment that considers whether an object that has had each of its pieces replaced one-by-one over time is still the same object when all is said and done. If every piece of wood in a ship has been replaced, is it the same ship? If every piece of JavaScript in an app has been replaced, is it the same app? We sure hoped so, because this seemed like the best course of action.

Fascinating look behind the scenes at both the process of rewriting a massively used application and the particular architectural choices made along the way. The approach used was at once incremental and all-encompassing, rewriting a piece at a time into a gradually growing “modern” section of the application that utilized React and Redux. And the results? 50% reduction of memory use and 33% improvement in load time… not too shabby.


Discussion

Sign in or Join to comment or subscribe

Jerod Santo

Jerod Santo

Omaha, Nebraska

Jerod co-hosts The Changelog, crashes JS Party, and takes out the trash (his old code) once in awhile.

2019-07-23T13:55:15Z ago

When I first saw this headline I was hoping the rewrite would be in platform-native technologies, but it looks like they managed to make major performance advantages while sticking with Electron.

Is there an easy way to know if you’re running the new code or not? (Please don’t say to check Activity Monitor for memory use 😆)

2019-07-24T21:40:25Z ago

Good question, I don’t know. I do see that their latest release was a major version (4.0.0) and is dated 7 days before this article was written. The release notes don’t make it seem like a massive rewrite though, unless this is snark: “Slack is now a little faster, thanks to a few small but important changes.”

Player art
  0:00 / 0:00