comparison mercurial/revlog.py @ 4974:a335345100ba

revlog: set the threshold for lazy parsing higher A typical machine can parse a 1MB index in well under a second
author Matt Mackall <mpm@selenic.com>
date Mon, 23 Jul 2007 20:44:08 -0500
parents a386a6e4fe46
children 8b7e480a7603
comparison
equal deleted inserted replaced
4973:a386a6e4fe46 4974:a335345100ba
317 def __init__(self): 317 def __init__(self):
318 self.chunkcache = None 318 self.chunkcache = None
319 319
320 def parseindex(self, fp, st, inline): 320 def parseindex(self, fp, st, inline):
321 if (lazyparser.safe_to_use and not inline and 321 if (lazyparser.safe_to_use and not inline and
322 st and st.st_size > 10000): 322 st and st.st_size > 1000000):
323 # big index, let's parse it on demand 323 # big index, let's parse it on demand
324 parser = lazyparser(fp, st.st_size, indexformatng, ngshaoffset) 324 parser = lazyparser(fp, st.st_size, indexformatng, ngshaoffset)
325 index = lazyindex(parser) 325 index = lazyindex(parser)
326 nodemap = lazymap(parser) 326 nodemap = lazymap(parser)
327 e = list(index[0]) 327 e = list(index[0])