~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/chk_map.py

use the page cache in CHKMap._read_bytes()

Show diffs side-by-side

added added

removed removed

Lines of Context:
177
177
            return node
178
178
 
179
179
    def _read_bytes(self, key):
180
 
        stream = self._store.get_record_stream([key], 'unordered', True)
181
 
        return stream.next().get_bytes_as('fulltext')
 
180
        try:
 
181
            return _page_cache[key]
 
182
        except KeyError:
 
183
            stream = self._store.get_record_stream([key], 'unordered', True)
 
184
            return stream.next().get_bytes_as('fulltext')
182
185
 
183
186
    def _dump_tree(self, include_keys=False):
184
187
        """Return the tree in a string representation."""