/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/btree_index.py

  • Committer: John Arbash Meinel
  • Date: 2009-03-27 04:23:35 UTC
  • mto: This revision was merged to the branch mainline in revision 4209.
  • Revision ID: john@arbash-meinel.com-20090327042335-5a8ii0h5sa4ktx04
Switch to using a FIFOCache.

That gives us the lookup performance of a dict, while still being capped
at max size.

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
    chunk_writer,
31
31
    debug,
32
32
    errors,
 
33
    fifo_cache,
33
34
    index,
34
35
    lru_cache,
35
36
    osutils,
645
646
        # nodes, and only 20 internal nodes. So the default of 100 nodes in an
646
647
        # LRU would mean we always cache everything anyway, no need to pay the
647
648
        # overhead of LRU
648
 
        self._internal_node_cache = {}
 
649
        self._internal_node_cache = fifo_cache.FIFOCache(100)
649
650
        self._key_count = None
650
651
        self._row_lengths = None
651
652
        self._row_offsets = None # Start of each row, [-1] is the end