A faster, smarter Quick Switcher
Jan 25, 2016

Summary
This post details a rewrite of the Quick Switcher to address performance and personalization. Performance improvements include: 1. Limiting initial display to 24 unread channels/DMs. 2. Templatizing HTML and reducing DOM elements. 3. Prefetching search data and using a more efficient sorting algorithm. This resulted in median render times of 7ms. Personalization is achieved through 'frecency', a scoring system based on frequency and recency of user interactions, with a formula balancing total count and recency. A bonus system was added to improve matching for partial names. Search matching was re-architected as a graph search for more flexible substring and initial matching.