The Lab · Written in the open

Lab.

Working notes from the studio. The tools I build, the workflows I keep, the mistakes I paid for.

498 entries · latest 2026-11-17

Browse every entry by topic

Latest entry

RAXXO Studios 8 min read

Why Slug Generation Gets Slower the More Titles You Feed It

A chained-regex slug function and a manual character loop return identical slugs, but one of them is twice as fast at 20,000 titles.

DevelopmentJavaScriptShopify
Read the entry
TLDR This entry in one minute
  • I benchmarked two ways to turn a title into a URL slug, across 1,000 to 20,000 titles
  • A single chained-regex version took 62.77ms at 20,000 titles, a manual character-loop version took 32.74ms on the same input
  • Below 1,000 titles the two were close enough to call a tie, roughly 7ms versus 6.4ms

All entries