Mercurial > public > mercurial-scm > hg
comparison mercurial/revlog.py @ 4992:0a676643687b
lazyparser: up the blocksize from 512 bytes to 64k
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Mon, 23 Jul 2007 20:44:08 -0500 |
parents | 9c8c42bcf17a |
children | 4205f626dc05 |
comparison
equal
deleted
inserted
replaced
4991:9c8c42bcf17a | 4992:0a676643687b |
---|---|
204 if self.all: | 204 if self.all: |
205 return | 205 return |
206 all = False | 206 all = False |
207 if i == None: | 207 if i == None: |
208 blockstart = 0 | 208 blockstart = 0 |
209 blocksize = (512 / self.s) * self.s | 209 blocksize = (65536 / self.s) * self.s |
210 end = self.datasize | 210 end = self.datasize |
211 all = True | 211 all = True |
212 else: | 212 else: |
213 if end: | 213 if end: |
214 blockstart = i * self.s | 214 blockstart = i * self.s |
215 end = end * self.s | 215 end = end * self.s |
216 blocksize = end - blockstart | 216 blocksize = end - blockstart |
217 else: | 217 else: |
218 blockstart = (i & ~63) * self.s | 218 blockstart = (i & ~1023) * self.s |
219 blocksize = self.s * 64 | 219 blocksize = self.s * 1024 |
220 end = blockstart + blocksize | 220 end = blockstart + blocksize |
221 while blockstart < end: | 221 while blockstart < end: |
222 self.loadblock(blockstart, blocksize) | 222 self.loadblock(blockstart, blocksize) |
223 blockstart += blocksize | 223 blockstart += blocksize |
224 if all: | 224 if all: |