railsadminteam / rails_admin

RailsAdmin is a Rails engine that provides an easy-to-use interface for managing your data
MIT License
7.9k stars 2.26k forks source link

N+1 error #3046

Open sushant12 opened 6 years ago

sushant12 commented 6 years ago

https://github.com/sferik/rails_admin/blob/master/lib/rails_admin/extensions/paper_trail/auditing_adapter.rb#L68 this line gives n+1 error when using bullet gem.


GET /admin
AVOID eager loading detected
  PaperTrail::Version => [:item]
  Remove from your finder: :includes => [:item]
Call stack

I removed the includes(:item) and the n+1 alert was then solved.

RyanTG commented 1 year ago

This n+1 is still present. I opened the class and removed includes(:item) and it didn't fix it for me, but I was probably doing something wrong.

MrFehr commented 2 months ago

Just in case anybody needs a resolution for this, installing the ArLazyPreload gem fixes all N+1 errors for RailsAdmin and makes it super fast.