[Xapian-tickets] [Xapian] #266: Add a minimise_memory() method.

Xapian nobody at xapian.org
Sun Jun 19 06:16:14 BST 2011


#266: Add a minimise_memory() method.
-------------------------+--------------------------------------------------
 Reporter:  richard      |       Owner:  olly     
     Type:  enhancement  |      Status:  assigned 
 Priority:  normal       |   Milestone:  1.3.0    
Component:  Library API  |     Version:  SVN trunk
 Severity:  normal       |    Keywords:           
Blockedby:               |    Platform:  All      
 Blocking:               |  
-------------------------+--------------------------------------------------

Comment(by olly):

 An idea I mentioned on IRC (and Richard seemed to like) was to add a
 {{{set_flush_threshold()}}} method instead.  If the threshold is reduced
 to below the currently batched size, we would then force a flush.  Perhaps
 setting the threshold to 0 should not "stick", but otherwise we could
 return the old threshold allowing:

 {{{
 #!cpp
 db.set_flush_threshold(db.set_flush_threshold(0));
 }}}

 Threshold would be in documents for now, but later we could add an
 optional second parameter to specify what it's in:

 {{{
 #!cpp
 db.set_flush_threshold(1, db.GB);
 }}}

 There's also the issue that we currently flush '''and commit''' when
 {{{$XAPIAN_FLUSH_THRESHOLD}}} is reached, so perhaps we want a flag in
 there to specify if it's flush or commit, or perhaps a
 {{{set_commit_threshold()}}} method which controls that.  You might want
 to flush every 10000 but commit every 100000 I guess.  Or flush every 1GB
 but commit every 10000 documents.

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



More information about the Xapian-tickets mailing list