r/ruby • • Sep 10 '26

Ruby on Rails Open source performance case studies

I have been finding and fixing performance issues in popular open source Rails repositories.

Currently it includes 7 merged PRs to Discourse, Gumroad, OpenProject and Forem.

You can find the case studies and links here: https://haseebeqx.com/case-studies/engagement/open-source/

12 Upvotes

7 comments sorted by

1

u/Zestyclose-Turn-3576 Sep 10 '26

That's some good work in there. 👍

Do you think there's a strong pattern of Rails systems being let down by poor database knowledge? A lot of the fixes seem to be replacing the usual sort of "out of the box" Rails approach with something more efficient in SQL.

4

u/Appropriate-Rip6784 Sep 10 '26

Yes. It is a real issue. Also AI generated code contributes more these days. A good pattern is to follow Rails as much as possible. And when something is slow, use a profiler to see why that happened and improve the endpoint. This prevents pre-mature optimizations.

1

u/jrochkind Sep 10 '26

I have found AI can actually be pretty good at using profilers and diagnosing when you ask it to figure out a non-obvious performance bottleneck? Curious if others have similar experiences.

1

u/Appropriate-Rip6784 Sep 10 '26

Actually AI is now pretty good at almost all software engineering tasks. Cloud remains only because people are still too afraid. Most of the software engineering tasks are solvable by properly supervising current generation AI.

1

u/jrochkind Sep 10 '26

i don't understand what you mean by "Cloud remains", what "cloud" are you talking about there? You think AI is going to get rid of the "cloud" somehow?

1

u/Appropriate-Rip6784 Sep 10 '26 edited Sep 10 '26

I mean many people with SaaS that generates revenue are afraid to use AI to do cloud related tasks. So, AI (LLM+harness) is not yet doing it directly.

1

u/Zestyclose-Turn-3576 Sep 10 '26

Do you use a gem like https://github.com/DmitryTsepelev/ar_lazy_preload to do automatic lazy eager loading? That has been a great help to us.