From ff74b2a6e293212dd7d91fac74352b4fd3d48f3c Mon Sep 17 00:00:00 2001 From: Maxim Pimenov Date: Mon, 27 Apr 2020 13:06:44 +0300 Subject: [PATCH] [search] Fixed results not fitting into the time limit by a large margin. branch found time (sec) addr: master 580 3967.97 reason 584 1006.47 fix 593 899.971 1-800: master 413 542.564 reason 410 425.469 fix 413 373.742 legend: addr and 1-800 are two sample sets of sizes 1876 and 665 respectively master - master branch, commit c97310b reason - the same commit with Line 827 in geocoder.cpp commented out fix - this commit The 413 found results are different in the master and fix entries, and reruns cause different results but the difference is in 2 samples on average. --- search/pre_ranker.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/search/pre_ranker.hpp b/search/pre_ranker.hpp index 46f4f72d21..2b3709fca0 100644 --- a/search/pre_ranker.hpp +++ b/search/pre_ranker.hpp @@ -85,7 +85,7 @@ public: // Use |lastUpdate| to indicate that no more results will be added. void UpdateResults(bool lastUpdate); - size_t Size() const { return m_results.size(); } + size_t Size() const { return m_results.size() + m_relaxedResults.size(); } size_t BatchSize() const { return m_params.m_batchSize; } size_t NumSentResults() const { return m_numSentResults; } bool HaveFullyMatchedResult() const { return m_haveFullyMatchedResult; }