~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/hashcache.py

  • Committer: Martin Pool
  • Date: 2005-07-20 17:30:51 UTC
  • Revision ID: mbp@sourcefrog.net-20050720173051-e413a67bd9d79701
- more buffering when reading/writing hashcache

Show diffs side-by-side

added added

removed removed

Lines of Context:
139
139
            return cache_sha1
140
140
        else:
141
141
            self.miss_count += 1
142
 
            digest = sha_file(file(abspath, 'rb'))
 
142
            digest = sha_file(file(abspath, 'rb', buffering=65000))
143
143
 
144
144
            now = int(time.time())
145
145
            if fp[1] >= now or fp[2] >= now:
200
200
 
201
201
        fn = self.cache_file_name()
202
202
        try:
203
 
            inf = file(fn, 'rb')
 
203
            inf = file(fn, 'rb', buffering=65000)
204
204
        except IOError, e:
205
205
            mutter("failed to open %s: %s" % (fn, e))
206
206
            return