summaryrefslogtreecommitdiffstats
path: root/component
diff options
context:
space:
mode:
authorJon Bratseth <bratseth@yahoo-inc.com>2017-01-17 15:10:26 +0100
committerJon Bratseth <bratseth@yahoo-inc.com>2017-01-17 15:10:26 +0100
commit5c2d0d657a4d1bab7ecc7665f73bc2e8bc0c229e (patch)
tree866a671a8e49adf9eebb436dcba265825d0ecb74 /component
parent199213c3b2013caf2ab14f99080e46b253c1cf2f (diff)
Avoid unnecessary registry creation
Use a static empty compiled query profile registry when there are no query profiles instead of recreating on every request as creating registries is expensive.
Diffstat (limited to 'component')
-rw-r--r--component/src/main/java/com/yahoo/component/provider/ComponentRegistry.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/component/src/main/java/com/yahoo/component/provider/ComponentRegistry.java b/component/src/main/java/com/yahoo/component/provider/ComponentRegistry.java
index 705dcabb110..17272710569 100644
--- a/component/src/main/java/com/yahoo/component/provider/ComponentRegistry.java
+++ b/component/src/main/java/com/yahoo/component/provider/ComponentRegistry.java
@@ -38,7 +38,7 @@ public class ComponentRegistry<COMPONENT> {
private Map<ComponentId, COMPONENT> componentsById =new LinkedHashMap<>();
/** True when this cannot be changed any more */
- private boolean frozen=false;
+ private boolean frozen = false;
/**
* Freezes this registry to prevent further changes. Override this to freeze internal data