average-vr-56795
03/19/2020, 5:37 PMhundreds-father-404
03/19/2020, 5:42 PMPathGlobs
in engine/fs.py
, the solution should be really simple. Change line 84 from
python
self.globs = tuple(globs)
to
python
self.globs = tuple(sorted(globs))
Globs are an Iterable[str]
, so it’s always safe to sort (or we got bigger problems) and sorting strings is cheaper than bad cache misseshundreds-breakfast-49010
03/19/2020, 5:44 PMhundreds-father-404
03/19/2020, 5:45 PMglobs
were not deterministic, e.g. if you passed a set to the constructor
Even if you passed a deterministic data structure like a tuple, we will still get more cache misses than we’d like. target1 with ['f1.py', 'f2.py']
sources and target2 with ['f2.py', 'f1'.py']
would be treated as distinct for no good reasonhundreds-breakfast-49010
03/19/2020, 5:45 PMhundreds-father-404
03/19/2020, 5:46 PMaverage-vr-56795
03/19/2020, 6:16 PMwitty-crayon-22786
03/19/2020, 6:37 PMhappy-kitchen-89482
03/19/2020, 7:01 PMwitty-crayon-22786
03/19/2020, 7:27 PMaverage-vr-56795
03/19/2020, 7:47 PM./pants --native-engine-visualize-to=/some/path list 3rdparty:
in the pants repowitty-crayon-22786
03/19/2020, 7:48 PMaverage-vr-56795
03/19/2020, 7:48 PMPathGlobs
witty-crayon-22786
03/19/2020, 7:48 PMaverage-vr-56795
03/19/2020, 7:48 PMwitty-crayon-22786
03/19/2020, 7:48 PM