[Xapian-tickets] [Xapian] #326: Searches with chert are slow, due to slow doclen access

Xapian nobody at xapian.org
Thu Feb 5 10:33:28 GMT 2009


#326: Searches with chert are slow, due to slow doclen access
---------------------------+------------------------------------------------
 Reporter:  richard        |        Owner:  richard  
     Type:  defect         |       Status:  assigned 
 Priority:  normal         |    Milestone:  1.1.0    
Component:  Backend-Chert  |      Version:  SVN trunk
 Severity:  normal         |   Resolution:           
 Keywords:                 |    Blockedby:           
 Platform:  All            |     Blocking:           
---------------------------+------------------------------------------------

Comment(by richard):

 Patches: avoid_string_appends_1.patch,
 avoid_string_appends_and_loop_unroll_2.patch and
 avoid_string_operations.patch progressively improve the speeds of the
 search (against the database with small doclen chunks): the first to 9.38
 seconds, the second to 8.56 and finally to 8.08.

 The first patch simply avoids some of the C++ string appends and resizing
 - the second adds some loop unrolling, which lets us avoid even more C++
 string appending and resizing.  However, I wasn't able to get rid of a
 fair amount of unneccessary dynamic allocation and string copying using
 standard C++ strings, so the third patch replaces the use of C++ strings
 for table keys with a fixed size char array.  This final patch isn't very
 tidy, but I think it's reasonable to conclude from its performance that
 this is worth looking into: we could have a fixed key buffer on each
 table, in which the keys are formed in-place, rather than by copying
 strings.

-- 
Ticket URL: <http://trac.xapian.org/ticket/326#comment:2>
Xapian <http://xapian.org/>
Xapian



More information about the Xapian-tickets mailing list