From 208dc368d4aec6804c88a2751785359c88419a2d Mon Sep 17 00:00:00 2001 From: Manish Vasani Date: Mon, 13 Jan 2020 13:42:14 -0800 Subject: [PATCH] Ensure that we don't kick off SolutionCrawler's Reanalyze functionality if solution crawler is turned off with the option `InternalSolutionCrawlerOptions.SolutionCrawler`. This is needed for our internal RPS performance tests which intend to turn off solution crawler for certain scenarios to reduce noise from it. --- .../Core/Portable/SolutionCrawler/WorkCoordinator.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Features/Core/Portable/SolutionCrawler/WorkCoordinator.cs b/src/Features/Core/Portable/SolutionCrawler/WorkCoordinator.cs index 0c206df7b10..b27ac3b033a 100644 --- a/src/Features/Core/Portable/SolutionCrawler/WorkCoordinator.cs +++ b/src/Features/Core/Portable/SolutionCrawler/WorkCoordinator.cs @@ -164,6 +164,12 @@ private void OnOptionChanged(object sender, OptionChangedEventArgs e) return; } + if (!_optionService.GetOption(InternalSolutionCrawlerOptions.SolutionCrawler)) + { + // Bail out if solution crawler is disabled. + return; + } + ReanalyzeOnOptionChange(sender, e); } -- GitLab