DjangoBB

Django based forum engine

  • You are not logged in.

#1 Sept. 30, 2011 23:30:29

Josh
Registered: 2011-09-30
Posts: 1
Reputation: +  0  -
Profile   Send e-mail  

Slow Search

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

Offline

#2 Oct. 20, 2011 14:49:07

scrapper
Registered: 2010-12-20
Posts: 43
Reputation: +  0  -
Profile   Send e-mail  

Slow Search

I am with you Josh.
I fixed “Search by Author” now I continue to make searches faster to avoid server timeout etc.

greetings
scrapper

Offline

#3 Oct. 20, 2011 14:54:42

slav0nic
DjangoBB Developer
From: Ukraine
Registered: 2009-10-25
Posts: 307
Reputation: +  6  -
Profile   Send e-mail  

Slow Search

maybe problem in pagination?
trac imho better place for technical discussions)
http://djangobb.org/ticket/182 [djangobb.org]

Offline

#4 Oct. 23, 2011 10:18:39

scrapper
Registered: 2010-12-20
Posts: 43
Reputation: +  0  -
Profile   Send e-mail  

Slow Search

slav0nic
maybe problem in pagination?
trac imho better place for technical discussions)
http://djangobb.org/ticket/182 [djangobb.org]

So here some info from me:
———————————
Reading more about whoosh it seems to be, that whoosh is mostly for testing and/or small amount of data to search in.
So the only thing which made the search speed up a bit was to change the haystack/constants.py settings a bit:
ITERATOR_LOAD_PER_QUERY defaults to 10, make this number greater something like 99999999.

But the truth is, its still slow. Right now we have about 25.000 posts to search and the number is increasing.
So to speed up the things we switched from WHOOSH to XAPIAN (C++).

Searches now do work fine now and perform fast.

@slav0nic:
you are right, pagination is an issue. To change from one result-page to the next you have to wait similar time as for the search.
I will look into this in the future. Must be a conceptional issue with pagination…

greetings
sc

Offline

Board footer

Moderator control

Powered by DjangoBB

Lo-Fi Version