diff options
author | Jon Bratseth <bratseth@yahoo-inc.com> | 2017-01-17 15:10:26 +0100 |
---|---|---|
committer | Jon Bratseth <bratseth@yahoo-inc.com> | 2017-01-17 15:10:26 +0100 |
commit | 5c2d0d657a4d1bab7ecc7665f73bc2e8bc0c229e (patch) | |
tree | 866a671a8e49adf9eebb436dcba265825d0ecb74 /component/src | |
parent | 199213c3b2013caf2ab14f99080e46b253c1cf2f (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/src')
-rw-r--r-- | component/src/main/java/com/yahoo/component/provider/ComponentRegistry.java | 2 |
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 |