Bug #21824: performance regression in regexp matching after update to 4.0 - Ruby - Ruby Issue Tracking System
15-May-2026 184
I'm running a service written in Ruby which serves some number of Bluesky feeds. As part of this service, I have a process that connects to a websocket API (w/ EventMachine), reads from it all new posts made on the network in real time (on the order of ~100 posts per second on average lately), and passes each post through a #post_matches? method in about 20 feed objects, each of which has a number of regexps configured (most have around 20-30, but one has a few hundred, probably something like 900 regexps in total). If a given post's text (up to 300 unicode characters) matches any of the regexps of the given feed (and/or matches some additional conditions), it's added to this feed in the database.
Bug #21824: performance regression in regexp matching after update to 4.0 - Ruby - Ruby Issue Tracking System #ruby #rubydeveloper #rubyonrails ##21824: #performance #regression #regexp #matching #after #update #Issue #Tracking #System #bug #performance https://rubyonrails.ba/link/bug-21824-performance-regression-in-regexp-matching-after-update-to-4-0-ruby-ruby-issue-tracking-system