TLDR Web Dev · ARTICLES & TUTORIALS
HOW WE MADE A RUBY METHOD 200X FASTER
Summary from the TLDR Web Dev newsletter
A performance regression in Campsite's API was identified through observability tools after code was refactored to transform rich text into plain text and Markdown. Profiling revealed that the bottleneck was the use of a certain node lookup. This was replaced with a more efficient HANDLERS_BY_NODE_NAMES hash lookup, which reduced processing time from 200ms to under 1ms.