[Xapian-tickets] [Xapian] #250: replace_document should make minimal changes to database file

Xapian nobody at xapian.org
Fri Nov 20 22:58:57 GMT 2009


#250: replace_document should make minimal changes to database file
---------------------------+------------------------------------------------
 Reporter:  richard        |       Owner:  olly     
     Type:  enhancement    |      Status:  new      
 Priority:  normal         |   Milestone:  1.2.x    
Component:  Backend-Chert  |     Version:  SVN trunk
 Severity:  normal         |    Keywords:           
Blockedby:                 |    Platform:  All      
 Blocking:                 |  
---------------------------+------------------------------------------------

Comment(by olly):

 I was thinking about this - as Richard says, we need to read the old
 termlist anyway, so it would be easy to iterate through the old and new at
 the same time which would avoid the rather large overhead of updating
 posting lists needlessly.  The additional cost when not needed is unlikely
 to be an issue since we need to do the same work anyway, except for
 comparing.  There may also be cache issues from increased working set size
 from doing both at once, but I'd be surprised if those matter.

 The other cases could be handled at the Btree level - e.g. a "replace()"
 method which is like "add()" but if the key is already set, checks if the
 tag value is the same.  The big advantage of doing it at this level is
 that we can probably spot many cases where the tag value must have changed
 without actually having to unpack the old tag - e.g. if the size is
 different (for non-compressed tags which aren't split at least).

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



More information about the Xapian-tickets mailing list