-
-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make /admin lighter #542
Comments
Looks like this is largely due to railsadmin attempting to count large tables. One query I caught was
railsadminteam/rails_admin#2968 mentions a https://wiki.postgresql.org/wiki/Count_estimate is also another interesting technique, but I suspect it'd be hard to wedge into rails admin. But it does seem to offer a row estimate that's < 1% off from the actual row count:
|
We'll need to upgrade rails admin to at least https://github.com/sferik/rails_admin/blob/master/CHANGELOG.md#130---2018-02-18 for that, but probably time for an upgrade (still on 0.8.1) |
Once we're upgraded it looks like the config is probably this: config.model 'BgeigieLog' do
list do
limited_pagination
end
end
config.model 'Measurement' do
list do
limited_pagination
end
end |
This is already implemented? |
Not yet, just gathering details. Looks like if we do the above we can probably get /admin working without bogging down the DB |
We have railsadmin set up at
/admin
but it tries to count measurements when you load it (very slow, too expensive to load on dev envs).It's possible #529 might also fix this if we do an ActiveRecord count cache and RailsAdmin uses that by default.
Either way, we can't count the measurement table for ever admin page load. Too expensive in general.
The text was updated successfully, but these errors were encountered: