Branch: Tag:

2001-09-25

2001-09-25 22:02:38 by Johan Schön <js@opera.com>

Added a query-local blob cache with 10 entries, which is populated by reading 10 blob packets at once if possible. This reduces i/o time wait by as much as 50%

Rev: lib/modules/Search.pmod/Database.pmod/Base.pmod:1.18
Rev: lib/modules/Search.pmod/Database.pmod/MySQL.pike:1.69
Rev: lib/modules/Search.pmod/Indexer.pmod:1.16
Rev: lib/modules/Search.pmod/Query.pmod:1.23

1:   // This file is part of Roxen Search   // Copyright © 2001 Roxen IS. All rights reserved.   // - // $Id: Query.pmod,v 1.22 2001/09/01 22:13:08 js Exp $ + // $Id: Query.pmod,v 1.23 2001/09/25 22:02:37 js Exp $      static function(string,int:string) blobfeeder(Search.Database.Base db, array words)   {    mapping state = mkmapping(words,allocate(sizeof(words))); -  +  mapping(string:mapping(int:string)) blobcache = ([ ]);    return lambda( string word, int foo )    { -  return db->get_blob(word, state[word]++); +  return db->get_blob(word, state[word]++, blobcache);    };   }