I am working on migrating a site from phpbb to djangobb. I have noticed that in some cases search can be very slow. I am using Haystack and whoosh. An example would be if a search matches ~10,000 posts. The page becomes unresponsive and eventually errors, probably due to server time out. I have narrowed this down to lines 179-191 of djangobb_forum.views.py
I think that the for loop takes an excessive amount of time. Does anyone have any ideas how to optimize this?
Thanks