aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/skyframe/GlobFunction.java
diff options
context:
space:
mode:
authorGravatar Miguel Alcon Pinto <malcon@google.com>2015-10-01 16:02:53 +0000
committerGravatar Damien Martin-Guillerez <dmarting@google.com>2015-10-01 19:44:14 +0000
commit2627b9f309e9abc66cf8ec1eb859a093d8a3bd04 (patch)
treeb8e35bff823873bd3cf167f4d85e6e083c502642 /src/main/java/com/google/devtools/build/lib/skyframe/GlobFunction.java
parent52808d2f6a4bf347f29c47f23d624f8b2bc69313 (diff)
Intern PackageIdentifiers as a memory optimization.
-- MOS_MIGRATED_REVID=104403040
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/skyframe/GlobFunction.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/skyframe/GlobFunction.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/GlobFunction.java b/src/main/java/com/google/devtools/build/lib/skyframe/GlobFunction.java
index 74e155c89c..db63627be7 100644
--- a/src/main/java/com/google/devtools/build/lib/skyframe/GlobFunction.java
+++ b/src/main/java/com/google/devtools/build/lib/skyframe/GlobFunction.java
@@ -67,7 +67,7 @@ public final class GlobFunction implements SkyFunction {
PathFragment globSubdir = glob.getSubdir();
if (!globSubdir.equals(PathFragment.EMPTY_FRAGMENT)) {
PackageLookupValue globSubdirPkgLookupValue = (PackageLookupValue) env.getValue(
- PackageLookupValue.key(new PackageIdentifier(
+ PackageLookupValue.key(PackageIdentifier.create(
glob.getPackageId().getRepository(),
glob.getPackageId().getPackageFragment().getRelative(globSubdir))));
if (globSubdirPkgLookupValue == null) {
@@ -228,7 +228,7 @@ public final class GlobFunction implements SkyFunction {
PathFragment directory = glob.getPackageId().getPackageFragment()
.getRelative(glob.getSubdir()).getRelative(fileName);
PackageLookupValue pkgLookupValue = (PackageLookupValue)
- env.getValue(PackageLookupValue.key(new PackageIdentifier(
+ env.getValue(PackageLookupValue.key(PackageIdentifier.create(
glob.getPackageId().getRepository(), directory)));
if (pkgLookupValue == null) {
return;