
Florencio Schroeder
Joined
10 Experience
0 Lessons Completed
0 Questions Solved
Activity
You need to use includes
and select
wisely. Avoid N+1 queries with includes
and only load the fields you need with select
. Especially for things like configuration lookups, permissions or repeated calculations during a request. Use background tasks to pre-process and cache expensive data (e.g. use Redis or rendered views). If you are waiting for multiple external calls, use Parallel
or concurrent-ruby
to execute them in parallel during the request cycle.