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 /container-search/src/main/java/com/yahoo/search/query/properties | |
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 'container-search/src/main/java/com/yahoo/search/query/properties')
-rw-r--r-- | container-search/src/main/java/com/yahoo/search/query/properties/QueryProperties.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/container-search/src/main/java/com/yahoo/search/query/properties/QueryProperties.java b/container-search/src/main/java/com/yahoo/search/query/properties/QueryProperties.java index d1caf9f3b5f..5abc6663063 100644 --- a/container-search/src/main/java/com/yahoo/search/query/properties/QueryProperties.java +++ b/container-search/src/main/java/com/yahoo/search/query/properties/QueryProperties.java @@ -71,8 +71,8 @@ public class QueryProperties extends Properties { @SuppressWarnings("deprecation") @Override - public Object get(final CompoundName key, Map<String,String> context, - com.yahoo.processing.request.Properties substitution) { + public Object get(CompoundName key, Map<String,String> context, + com.yahoo.processing.request.Properties substitution) { if (key.size()==2 && key.first().equals(Model.MODEL)) { if (key.last().equals(Model.QUERY_STRING)) return query.getModel().getQueryString(); if (key.last().equals(Model.TYPE)) return query.getModel().getType(); @@ -145,7 +145,7 @@ public class QueryProperties extends Properties { @SuppressWarnings("deprecation") @Override - public void set(final CompoundName key,Object value,Map<String,String> context) { + public void set(CompoundName key, Object value, Map<String,String> context) { // Note: The defaults here are never used try { if (key.size()==2 && key.first().equals(Model.MODEL)) { |