Problem with normpath_join in buck.py makes 'parsing build files' very slow
Created by: mread
strace shows that almost all the "parsing build files" time is spent making calls to lstat with invalid paths. These paths are constructed by the normpath_join function as part of glob_walk.
The function concatenates normpath and element but sometimes these overlap, e.g. picking some output at random from buck test --all and dumping normpath
and element
to stderr:
normpath = '/mnt/scratch/readm/work/git-checkouts/buck/third-party/java/aosp/tests/tests/src/tests/src/com/tests/src/com/android/tests/src/com/android/manifmerger/tests/src/com/android/manifmerger/data'
element = 'tests/src/com/android/manifmerger/data/47_uses_feat_gles_conflict.xml'
Concatenating these and calling os.path.islink is pointless and with a working directory containing approximately 78k source files has a huge performance penalty.