RoRvsWild @rorvswild.com · Nov 25

One step further It works fine with a few thousand. But that would probably eat too much memory if you're loading a lot of ActiveRecord instances. The trick is to load IDs only if you do not need to access any attributes or methods.

3 likes 1 replies

?

Replies

RoRvsWild · Nov 25

Side notes Bulk enqueuing has been introduced in Rails 7.1. It's not supported by all job backends. But if your are using Solid Queue, GoodJob or Sidekiq you're good ;-)