For me using select_related, prefetch_related and defer generally soft the issues. If that's still too slow then, if possible, you could look at using caching the queryset(s) you need the values. Have you run debug toolbar on the page to check what queries are running?
On Saturday, 5 February 2022 at 20:27:10 UTC stevesm...@hotmail.com wrote: > Hello all! > > I find formsets wildly useful...but very difficult to architect. I have > them working...But I am running into a commonly documented problem...They > are slow as you build up the number of fields and queries. Are there any > general tips that can be used or share on how to improve this issue? I > have tried all of the commonly prescribed > solutions...select_related...prefetch_related...etc...But nothing seems to > help. > > I realize that Queries take time....but I'm just trying to see if there is > a way to streamline them a bit. It seems to me that formsets use a lot of > queries depending on the amount of data and that's the trade off. > > Again thanks for any thoughts or comments. > > Steve > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/6513c105-8151-4c7a-8fd2-e692d5c5dcb5n%40googlegroups.com.