A faster, smarter Quick Switcher

Getting to the right conversation in Slack should be easy. And it should be fast. Like, really fast. When we first released the Quick Switcher in early 2014, we aimed to provide a way to quickly and easily switch to any channel or direct message you wanted. It was keyboard accessible (just press ⌘+k on…

Diógenes Brito
11 min readintermediate
--
View Original

Overview

The article discusses the improvements made to Slack's Quick Switcher, focusing on enhancing its performance and personalization features. Key changes include optimizing loading times and implementing a 'frecency' algorithm to prioritize frequently and recently accessed channels and direct messages.

What You'll Learn

1

How to optimize loading times for user interface components

2

Why personalizing user experiences improves application usability

3

How to implement a frecency algorithm for sorting results

Key Questions Answered

What were the main performance issues with the original Quick Switcher?
The original Quick Switcher was slow on large teams, taking several seconds to open, and had an overly simplistic matching and sorting algorithm. It also failed to remember user preferences, which led to inefficiencies in accessing frequently used channels and messages.
How does the new Quick Switcher improve performance?
The new Quick Switcher opens nearly instantly, with a median opening time of 7 milliseconds and rendering results in 12 milliseconds. This was achieved by limiting the displayed list to unread channels and direct messages, optimizing HTML building, and implementing data prefetching.
What is the frecency algorithm and how does it work?
The frecency algorithm combines frequency and recency of user interactions to prioritize results in the Quick Switcher. It records user queries and their corresponding selections, assigning scores based on how recently and frequently they were accessed, thus improving the relevance of search results.

Key Statistics & Figures

Median opening time of Quick Switcher
7 milliseconds
This is a significant improvement from the original implementation, which took 85 milliseconds to open.
Median rendering time of results
12 milliseconds
This performance metric highlights the efficiency of the new Quick Switcher compared to the previous version.

Key Actionable Insights

1
Implement a frecency algorithm to enhance user experience in applications that require frequent access to specific items.
By prioritizing items based on user interaction history, applications can reduce the time users spend searching for frequently used features, leading to increased efficiency.
2
Limit the initial data load in user interfaces to improve performance.
Showing only the most relevant data on initial load can significantly decrease loading times, especially in applications with large datasets.
3
Utilize data prefetching techniques to enhance application responsiveness.
Prefetching data needed for user interactions can minimize delays and improve the overall user experience, particularly in applications with dynamic content.

Common Pitfalls

1
Failing to optimize loading times can lead to user frustration and decreased productivity.
Applications that take too long to respond can drive users away, especially in environments where quick access to information is critical.