mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 15:27:13 +03:00
dirstate: avoid use of zip on big lists
In a clean working directory containing 170,000 tracked files, this improves performance of "hg --time diff" from 1.69 seconds to 1.43. This idea is due to Siddharth Agarwal.
This commit is contained in:
parent
a288702cfd
commit
09d0142d5e
@ -696,8 +696,9 @@ class dirstate(object):
|
||||
# step 3: report unseen items in the dmap hash
|
||||
if not skipstep3 and not exact:
|
||||
visit = sorted([f for f in dmap if f not in results and matchfn(f)])
|
||||
for nf, st in zip(visit, util.statfiles([join(i) for i in visit])):
|
||||
results[nf] = st
|
||||
nf = iter(visit).next
|
||||
for st in util.statfiles([join(i) for i in visit]):
|
||||
results[nf()] = st
|
||||
for s in subrepos:
|
||||
del results[s]
|
||||
del results['.hg']
|
||||
|
Loading…
Reference in New Issue
Block a user