Skip to content

Commit a6a66d0

Browse files
zzl0facebook-github-bot
authored andcommitted
casecollisionauditor: ignore eden_dirstate_map
Summary: The default casecollisionauditor reads all of dirstate._map by iterating through it. This is expensive for a large repo and eden now raises RuntimeError for the iterator method. Please check D3964461 (73f0e3d) for more info. As Jun pointed out: * For non-edenfs we would always use treestate, therefore the original `if not dirstate._istreestate and not dirstate._istreedirstate:` check always evaluate to `False`. * For EdenFS, due to above reason, we should not go into the `then`-part of the if statement. So we can just delete the `then`-part of the if statement: ``` if not dirstate._istreestate and not dirstate._istreedirstate: allfiles = "\0".join(dirstate._map) self._loweredfiles = set(encoding.lower(allfiles).split("\0")) ``` Reviewed By: quark-zju Differential Revision: D42210487 fbshipit-source-id: 6c5d5daca9dd85deae6505344a4abad2cafb2831
1 parent 01167e3 commit a6a66d0

1 file changed

Lines changed: 3 additions & 7 deletions

File tree

eden/scm/edenscm/scmutil.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -442,13 +442,9 @@ class casecollisionauditor(object):
442442
def __init__(self, ui, abort, dirstate):
443443
self._ui = ui
444444
self._abort = abort
445-
if not dirstate._istreestate and not dirstate._istreedirstate:
446-
allfiles = "\0".join(dirstate._map)
447-
self._loweredfiles = set(encoding.lower(allfiles).split("\0"))
448-
else:
449-
# Still need an in-memory set to collect files being tested, but
450-
# haven't been added to treestate yet.
451-
self._loweredfiles = set()
445+
# Still need an in-memory set to collect files being tested, but
446+
# haven't been added to treestate yet.
447+
self._loweredfiles = set()
452448
self._dirstate = dirstate
453449
# The purpose of _newfiles is so that we don't complain about
454450
# case collisions if someone were to call this object with the

0 commit comments

Comments
 (0)