aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/skyframe/GlobValue.java
diff options
context:
space:
mode:
authorGravatar Janak Ramakrishnan <janakr@google.com>2016-07-18 20:33:28 +0000
committerGravatar Dmitry Lomov <dslomov@google.com>2016-07-19 18:09:45 +0000
commit063b4887b5ac2b1baaf5f6753abaa07736073831 (patch)
tree7729e435bd7e28970a48ad4aa159fcca04d1975d /src/main/java/com/google/devtools/build/lib/skyframe/GlobValue.java
parentee36dd3f5db8e7ad129b2782a24eb97a0478fc42 (diff)
Sort the results returned by the HybridGlobber if we are using results from Skyframe globbing. This adds a log(n) factor to uses of globs, but getting globs to be returned in a reasonable order that can be emulated by legacy globbing is hard and bug-prone right now, and we must sort anyway if we are merging legacy and Skyframe globs.
Note that this log(n) factor is already present on clean builds with legacy globbing. If we end up seeing performance issues on incremental loading, we can investigate making GlobFunction efficiently return elements in sorted order. (We would still need to sort if merging legacy and Skyframe globs, but that should be a relatively rare occurrence, and can be dealt with by a more efficient merge sort if necessary.) -- MOS_MIGRATED_REVID=127752554
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/skyframe/GlobValue.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/skyframe/GlobValue.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/GlobValue.java b/src/main/java/com/google/devtools/build/lib/skyframe/GlobValue.java
index 5f8eaa90ea..cd4dd85f34 100644
--- a/src/main/java/com/google/devtools/build/lib/skyframe/GlobValue.java
+++ b/src/main/java/com/google/devtools/build/lib/skyframe/GlobValue.java
@@ -47,7 +47,8 @@ public final class GlobValue implements SkyValue {
}
/**
- * Returns glob matches.
+ * Returns glob matches. The matches will be in a deterministic but unspecified order. If a
+ * particular order is required, the returned iterable should be sorted.
*/
public NestedSet<PathFragment> getMatches() {
return matches;