Hello beautiful feature flagger!
I have two fantastical releases for you today (it's a buy one get one free kind of day).
@bkeepers and I spent a little time working on performance and we are pumped with the result. We're dubbing this release "Ricky Bobby".
I'm a believer in leading with the heat, so let's go out of order start with the biggest improvements.
The hot path for Flipper is reads and that means
Flipper.enabled?. So we started there with a couple of scripts guiding our way like a wise old mentor.
We rinsed and repeated this for a couple hours and by the end Flipper.enabled? with an actor was 55% faster and without an actor was 37% faster. Not a bad mornings work!
Simply update to 0.26.1 and you'll get this performance improvement for free.
Active Record Adapter
If you're using the ActiveRecord adapter (let's face it we are all lazy and doing this), then hang around. You'll want to update to 0.26.2. I switched the AR adapter from using model's directly to pluck. That's it.
For people using thousands of gates (some do, they are still welcome here), this will be huge. I tested the AR adapter improvement with 2k gates and saw > 8x improvement in iterations per second. More gates == more improvement for you.
To round out these two releases, we have a couple minor improvements that are also sweet.
- Make Memory adapter threadsafe (PRs here and here)
- ActiveRecord adapter: wrap all reads/writes in
- Improve performance of background polling (PR)
Hope you flipping enjoyed reading this as much as we enjoyed the work involved in these releases! Go forth and flip faster.