'Problems trying to improve performance on ModelResource
We have a model, with almost 200k objects and an Export button on Admin that was getting timeout.
The resource was dehydrating properties and accessing to DB many times, so I thought that create annotations to those known fields should fix
I tried to override the get_queryset on my class that extends from resources.ModelResouce but without success, this override never had been called, I tried next to override the admin.ModelAdmin.get_queryset and then I had some changes and the export was way better than before, but the load on this Admin became to be too slow
What is the better way to keep Admin on same performance and apply the annotations only on Resource class?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
