HasMany relationships load all objects and then count on collection page #1464
Labels
bug
breakages in functionality that is implemented
dashboards
how administrate presents fields and displays data
I was attempting to load an index of resources that had hundreds of thousands of associated resources through a
has_many
relationship. When querying, it is attempting to load all objects in memory, before counting. Thus slowing down the app (unnecessarily and unexpectedly) since all that displays is a count for those associated objects.I have something like this:
A very slow response!
I've come up with a solution that'll I'll submit as a PR.
The text was updated successfully, but these errors were encountered: