You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am generating a crazy huge number of queries on pages where I have a lot of thumbnails. The django-debug-toolbar is showing me this comes from some places where I am iterating through a query set and getting a thumbnail for each item. Is there a way to select_related or otherwise solve the N+1 problem here? I don't see anything in the documentation which seems like it would answer this.
The text was updated successfully, but these errors were encountered:
It will probably be hard with a select related, just because it's a template tag. I noticed the same as you, when rendering many thumbnails. It gets slow. I wonder if adding another cache layer could help - redis/memcached and the like would sure be much faster, than the Django ORM.
I am generating a crazy huge number of queries on pages where I have a lot of thumbnails. The django-debug-toolbar is showing me this comes from some places where I am iterating through a query set and getting a thumbnail for each item. Is there a way to select_related or otherwise solve the N+1 problem here? I don't see anything in the documentation which seems like it would answer this.
The text was updated successfully, but these errors were encountered: