-
Notifications
You must be signed in to change notification settings - Fork 30
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
Merging active pull requests #19
Comments
Hi @raihan2006i, yes I'm still using this gem actively. Sure, please feel free to merge my fork and close the open PRs. I've also noticed a performance problem with the "Non Archived" count that was causing issues for me with requests timing out. It is this line of code: https://github.com/raihan2006i/active_admin_paranoia/blob/master/lib/active_admin_paranoia/dsl.rb#L47 I have paranoia set up to add the "deleted_at" scope by default to all my models, so this was doubling the WHERE clause, e.g.
For some reason this really confused Postgres and prevented it from using the index, so the query did a full table scan that took over 2 minutes (for some tables). I've added the same
This clears any existing scope that uses the So that commit is in my fork as well |
Another quick update (just posting on this issue instead of opening a new one) - we actually ran into a performance problem with a table that had a few million rows. I think I was wrong with the comment above, and I just need to fully disable the counts for the "Archived" and "Non-Archived" tabs. I couldn't figure out how to make this configurable, so I've just added
It would be nice if this gem could expose this somehow as a configuration option |
@ndbroadbent As far I know you have merged all the open PRs into your fork. Is it possible to merge your fork and close the open PRs?
The text was updated successfully, but these errors were encountered: