tolomea/django-auto-prefetch

Prefetching doesn't work with iterator

Opened this issue · 0 comments

Description

I believe this is becuase it doesn't got through _fetch_all and so peers doesn't get set
I think this could be fixed by overriding _iterator where Django does it's prefetches
Essentially copy the while loop and use it to set peers instead of calling prefetch_related