On Wed, 2006-08-02 at 11:13 +0900, David Balmain wrote:
> On 8/1/06, Pedro Côrte-Real <[EMAIL PROTECTED]> wrote:
> > On Tue, 2006-08-01 at 18:59 +0900, David Balmain wrote:
> > > Hmmm. Sounds like an interesting application. One solution would be to
> > > cache the sort index on disk. The problem with this is that the cache
> > > would still need to be recalculated every time you add more documents
> > > to the index so you'll still have the long wait occasionally. I'll
> > > look into it anyway at a later stage.
> >
> > For my application this wouldn't really be a problem since data is only
> > loaded maybe once a week. But does the cache need to be recalculated
> > completely? Database indexes work incrementally.
> 
> Have you tried optimizing your index? I found an order of magnitude
> difference in speed here with an optimized index. Even with 1,000,000
> unique documents though sorting is taking less than 10 seconds for an
> unoptimized index and less than 1 second for optimized index. What
> kind of system are you running on?

I was guessing acts_as_ferret did that. But apparently only on
rebuild_index. I'll try adding an optimize call at the start of the app.

I'm running this on a 2.66 GHz Celeron with 1GB ram.

Pedro.

_______________________________________________
Ferret-talk mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ferret-talk

Reply via email to