Fix: Fixed issue where search continued running after navigating away or closing a tab#18646
Conversation
… search or closing a tab
|
I'm not certain the search is stopping, Files shows that it's not loading anything, but CPU usage goes from 0.1% when idle to around 10% start of search and stays there for about 10 seconds before decreasing only a lit bit around 5-8% when backing out to the home page or empty folder. Although this is much less than 4.1.5 staying around 25-30% after backing out Search results are shown same as 4.1.5 |
|
The remaining CPU after cancellation comes from Windows Search running as an in-process COM server inside Files.exe. When cancelled, the .NET task stops immediately but the native search work already in the thread pool drains briefly. Beyond this fix, moving the search execution out-of-process would eliminate this entirely. |
Josh65-2201
left a comment
There was a problem hiding this comment.
As long as that amount is expected, all good
Resolved / Related Issues
Fixed an issue where search queries kept running in the background even after the user cleared the search, navigated to a different folder, or closed the tab, causing sustained CPU usage.
Closes #18393
Steps used to test these changes
Note: A brief CPU in Files.exe after cancellation is expected due to Windows Search runs as an in-process COM server and its native thread pool work drains briefly after the .NET task unblocks. Please find the profiler screenshot attached
