News for hackers. Stuff that matters.
Re:Ruby Video – On a mission to index all Ruby conferences by chris12321 on Tuesday December 17, 2024 @10:29AM (#42442125)
Since Rails 7.1 we've had https://www.rubydoc.info/github/rails/rails/ActiveRecord%2FR... which actaully does run queries in parallel.

There's also Rails' russian doll caching, which can actaully results in pages with n+1 queries running quicker than ones with preloaded queries. https://rossta.net/blog/n-1-is-a-rails-feature.html

Re:Ruby Video – On a mission to index all Ruby conferences by ElatedOwl on Tuesday December 17, 2024 @11:02AM (#42442438)
load_async is still concurrency, but not parallelism. The queries themselves can run parallel, but when materializing AR objects e.g., only one thread can run at a time. A greedy thread in process will still subject you to GVL waits
Re:Ruby Video – On a mission to index all Ruby conferences by Lio on Wednesday December 18, 2024 @03:59PM (#42455107)
If that’s a problem for you right now I’d suggest giving JRuby a look as it has no GVL and true multithreading.

Hopefully as Ractors mature that problem will be solved for MRI too.