ActiveRecord #load_async speeds up queries in Rails 7.0
The load_async
method allows you to speed up queries by loading threads in an asynchronous way. It helps reduce the response time dramatically, especially for large databases. This method handles loading records, before they are referenced in the view, making the foreground thread do the work before it is sent to the background.