Get the latest tech news

How we made a Ruby method 200x faster


Hat tip to profiling and flamegraphs

Campsite stores lots of rich text, including in posts, comments, messages, and call summaries. Before the PR that introduced the performance regression, we had a single PlainText class responsible for transforming HTML into plain text. Our Rails app primarily serves as an API for our client Next.js application, so it mostly renders JSON, but we still find rack-mini-profiler valuable.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of ruby

ruby

Photo of 200x

200x

Photo of Ruby method

Ruby method

Related news:

News photo

Optimize Database Performance in Ruby on Rails and ActiveRecord

News photo

Understanding Ruby 3.3 Concurrency: A Comprehensive Guide

News photo

Low-poly image generation using evolutionary algorithms in Ruby (2023)