Curious how our team tackles complicated technical challenges to unlock key performance improvements? Check out this deep dive from one of Evernote's senior engineers. 💚
We knew we could make things faster. But not 1,000 times faster... *** When the team observed that sharing large notebooks and team workspaces in Evernote was frustratingly slow, they challenged themselves to make it faster than ever. The first step was to investigate the existing service to understand the underlying inefficiencies. Senior engineer at Evernote, Mattia Gentil, explains: “A few things were contributing to an overall slow experience: • First, the legacy service was breaking down each shared notebook or workspace into individual entities (such as notes and tasks) and fetching them one by one during the sharing process. • Then, for each of those entities, the service was performing two SQL queries: one to a database, and one to a secondary microservice to fetch additional metadata. • Finally, the service relied on a custom tree-like data structure to compute the new permissions resulting from the share. All of this—pulling individual entities, multiple SQL queries, an external miscroservice, and complex data structures—resulted in a laggy and unreliable customer experience. We were faced with a choice: We could work on incremental improvements. Or we could scrap the whole service and start from scratch.” In the end, the team decided to go all-in and rewrite the whole service. This was the more difficult path, but it had the potential to create the greatest value for our customers. “This was a tricky data engineering problem on many fronts,” Mattia continues. “We had to repackage the queries to go from six to two. We had to find a way to make a single request to our database, no matter the size of the notebook. And we had to introduce HashMaps to replace the custom data structures, integrating a new microservice into the main sharing service.” Everyone expected these changes to make the sharing experience smoother and faster, but it wasn’t until Mattia ran the first tests on the new service that he realized just how much speed they had unlocked. “When I saw the sharing speed was a thousand times faster in some cases, I couldn't believe it. I re-ran the tests at least five times before I was convinced it wasn’t some kind of fluke. From there, the improvements continued to pile up: Sharing times for smaller notebooks also got noticeably faster, and a common cause of timeout errors was eliminated completely, improving overall reliability. It was fantastic to see all our hard work pay off in such a clear and immediate way for our customers.” Huge bravo to the team for choosing the more challenging option and successfully executing such meaningful improvements. 👏