SOLR-9074: solrj CloudSolrClient.directUpdate tweak

Defer two NamedList allocations and initialCapacity one of them.
This commit is contained in:
Christine Poerschke 2016-05-06 09:57:22 +01:00
parent c7929f8b85
commit d3e2c45907
1 changed files with 3 additions and 3 deletions

View File

@ -618,14 +618,14 @@ public class CloudSolrClient extends SolrClient {
return null;
}
NamedList<Throwable> exceptions = new NamedList<>();
NamedList<NamedList> shardResponses = new NamedList<>();
Map<String, LBHttpSolrClient.Req> routes = updateRequest.getRoutes(router, col, urlMap, routableParams, this.idField);
if (routes == null) {
return null;
}
final NamedList<Throwable> exceptions = new NamedList<>();
final NamedList<NamedList> shardResponses = new NamedList<>(routes.size()+1); // +1 for deleteQuery
long start = System.nanoTime();
if (parallelUpdates) {