aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/syntax/FuncallExpression.java
diff options
context:
space:
mode:
authorGravatar nharmata <nharmata@google.com>2018-03-23 10:27:02 -0700
committerGravatar Copybara-Service <copybara-piper@google.com>2018-03-23 10:28:36 -0700
commit7fff2bf3ccb5edd2f71f3657709a2c210bd87001 (patch)
tree8e85ac371ded4f3f27fa5fa55f32b6c989bfa80d /src/main/java/com/google/devtools/build/lib/syntax/FuncallExpression.java
parenta35787433b1ef6f39818375637d44367f4db9ff6 (diff)
Don't bound the method and field name caches in FuncallExpression.
The number of *unique* Class instances that will be used as keys in these caches over the lifetime of a Bazel server is small-ish, and bounded by the size of the set of unique Classes used as the Java runtime representation of Skylark objects. The bookkeeping done by LocalCache when the cache's size is bounded is therefore pure CPU overhead. While we're here, just use the default capacity (16); a smaller initial capacity seems silly considering these caches are live for the duration of the Bazel server. RELNOTES: None PiperOrigin-RevId: 190238099
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/syntax/FuncallExpression.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/syntax/FuncallExpression.java4
1 files changed, 0 insertions, 4 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/syntax/FuncallExpression.java b/src/main/java/com/google/devtools/build/lib/syntax/FuncallExpression.java
index 1569fa51c2..ff81eade53 100644
--- a/src/main/java/com/google/devtools/build/lib/syntax/FuncallExpression.java
+++ b/src/main/java/com/google/devtools/build/lib/syntax/FuncallExpression.java
@@ -84,8 +84,6 @@ public final class FuncallExpression extends Expression {
private static final LoadingCache<Class<?>, Map<String, List<MethodDescriptor>>> methodCache =
CacheBuilder.newBuilder()
- .initialCapacity(10)
- .maximumSize(100)
.build(
new CacheLoader<Class<?>, Map<String, List<MethodDescriptor>>>() {
@@ -118,8 +116,6 @@ public final class FuncallExpression extends Expression {
private static final LoadingCache<Class<?>, Map<String, MethodDescriptor>> fieldCache =
CacheBuilder.newBuilder()
- .initialCapacity(10)
- .maximumSize(100)
.build(
new CacheLoader<Class<?>, Map<String, MethodDescriptor>>() {