{"id":5087,"date":"2026-09-10T00:44:48","date_gmt":"2026-09-10T03:44:48","guid":{"rendered":"https:\/\/tucumandevelopers.com\/index.php\/2026\/09\/10\/why-rider-and-resharper-were-slow-to-start-and-how-microsoft-helped-fix-the-problem\/"},"modified":"2026-09-10T00:44:48","modified_gmt":"2026-09-10T03:44:48","slug":"why-rider-and-resharper-were-slow-to-start-and-how-microsoft-helped-fix-the-problem","status":"publish","type":"post","link":"https:\/\/tucumandevelopers.com\/index.php\/2026\/09\/10\/why-rider-and-resharper-were-slow-to-start-and-how-microsoft-helped-fix-the-problem\/","title":{"rendered":"Why Rider and ReSharper Were Slow to Start, and How Microsoft Helped Fix the Problem"},"content":{"rendered":"<div>\n<div>\n<section data-clarity-region=\"article\">\n<div>\n<p><a href=\"\/dotnet\/category\/net-tools\/\">.NET Tools<\/a> <a href=\"\/dotnet\/category\/resharper\/\">ReSharper Platform<\/a> <a href=\"\/dotnet\/category\/rider\/\">Rider<\/a><\/p>\n<div>\n<\/p><\/div>\n<p>When we launched <a href=\"https:\/\/blog.jetbrains.com\/dotnet\/2025\/08\/28\/resharper-s-new-out-of-process-engine-cuts-ui-freezes-in-visual-studio-by-80\/\">ReSharper\u2019s out-of-process (OOP) architecture<\/a>, users reported slower startup times for IDEs using ReSharper on Windows. After profiling, the cause surprised us: Microsoft Defender was scanning our process for longer than we expected. This post is about what we found, what we learned working with Microsoft, and a tool we built that allows others to run the same investigation.<\/p>\n<h2>An unexpected factor in startup performance<\/h2>\n<p>Performance of our tools has consistently been the number one subject of feedback we\u2019ve received from our users over the years. Our telemetry and user surveys confirmed what many of you have been telling us: Despite ReSharper\u2019s powerful features, the impact on Visual Studio\u2019s responsiveness was affecting your daily workflow. This led us down the path of developing our new <a href=\"https:\/\/lp.jetbrains.com\/resharper-oop\/\" target=\"_blank\" rel=\"noopener\">out-of-process (OOP) architecture<\/a>. We originally launched OOP mode for the public last year. (Now, thanks to these investigations, as of 2026.2.1 it is enabled by default.) In general, our telemetry indicated improved performance. However, at some point, we noticed something unexpected \u2013 customers started reporting slower startup times. After a few profiling iterations, the collected data pointed to an unexpected source of latency: Microsoft Defender.<\/p>\n<p>It turned out that processes in write-protected paths receive wider trust rules. Microsoft Defender barely touches those processes during startup \u2013 scanning takes a couple of seconds, even when ReSharper loads their DLLs from the user installation directory. But the moment ReSharper started running as a separate process, Defender scanned it in full, adding tens of seconds to first launch (see the chart below).<\/p>\n<div>\n<figure><figcaption>ReSharper In-Process vs Out-of-Process<\/figcaption><\/figure>\n<\/div>\n<p>This triggered our curiosity and sent us down a rabbit hole. We started analyzing Microsoft Defender ETW (<a href=\"https:\/\/learn.microsoft.com\/windows-hardware\/test\/wpt\/event-tracing-for-windows\" target=\"_blank\" rel=\"noopener\">Event Tracing for Windows<\/a>) logs across dozens of developer tools, and the findings were striking: Some tools get scanned for 30+ seconds at startup while others finish in under a second, as we had observed above. We obviously wanted to learn the reasons behind that and find ways to speed up startup for JetBrains tools. An ambitious project, but we were up for the challenge!<\/p>\n<p>The first thing we needed was to set up a repeatable measurement process. That way we could share it with other teams in JetBrains, and with our colleagues from Microsoft to have a productive conversation. We are grateful for all Microsoft\u2019s explanations, openness, and willingness to help us with this investigation.<\/p>\n<h2>Measuring the impact<\/h2>\n<p>We tracked the activity of Microsoft Defender in two ways: Microsoft Defender ETW logs (as mentioned above) and direct CPU time measurements. We found the two methods to be roughly equivalent for our scenario. If you\u2019re interested in the distinction, see <a href=\"https:\/\/github.com\/JetBrains\/defender_performance_tool\/tree\/master#lightweight-cpu-time-tui\" target=\"_blank\" rel=\"noopener\">our GitHub readme for more info<\/a>.<\/p>\n<p>Microsoft Defender, like many other Windows components, uses ETW. It emits events under the Microsoft-Antimalware-Engine provider. Microsoft provides a <a href=\"https:\/\/learn.microsoft.com\/defender-endpoint\/tune-performance-defender-antivirus\" target=\"_blank\" rel=\"noopener\">PowerShell module for Defender-related performance investigations<\/a> that uses this provider. It has two cmdlets: <a href=\"https:\/\/learn.microsoft.com\/en-us\/powershell\/module\/defenderperformance\/new-mpperformancerecording\" target=\"_blank\" rel=\"noopener\">New-MpPerformanceRecording<\/a> to collect a trace, and <a href=\"https:\/\/learn.microsoft.com\/en-us\/powershell\/module\/defenderperformance\/get-mpperformancereport\" target=\"_blank\" rel=\"noopener\">Get-MpPerformanceReport<\/a> to analyze it.<\/p>\n<p>In our scenarios, most slowdowns came from Microsoft Defender\u2019s scan events. The Microsoft-Antimalware-Engine\/StreamScanRequestTask ETW events report each scan\u2019s <em>Start <\/em>and <em>End <\/em>time, representing how long Defender spent scanning that stream in real-world elapsed time. The data we gathered showed us clearly how Defender was impacting our tool\u2019s startup wall time.<\/p>\n<h3>Methodology<\/h3>\n<p>Performance measurements were run on a Dell Pro Max 16 (MA16250) laptop with an Intel Core Ultra 9 285H (16 cores) processor and 64 GB of DDR5-class memory. The host ran Windows 11 Pro. The workload was executed inside a Hyper-V VM configured with 8 vCPUs and 8 GB of static RAM. Each tool was measured 10 times.<\/p>\n<p>As per standard best practices when measuring performance, we rebooted our VM before each measurement to simulate a cold start. This reduced observed file and memory caching effects on our results.<\/p>\n<p>The charts below show the mean scan time with standard deviation error bars.<\/p>\n<h2>Results of the experiment<\/h2>\n<div>\n<figure><\/figure>\n<\/div>\n<div>\n<figure><\/figure>\n<\/div>\n<div>\n<figure><\/figure>\n<\/div>\n<div>\n<figure><\/figure>\n<\/div>\n<p>As you can see, we measured a variety of development tools, and there were clear differences in the amount of time Defender took to scan them:&nbsp;<\/p>\n<ul>\n<li><strong>JetBrains IDEs<\/strong> (JetBrains IDEs, and some other editor-class tools) took roughly 10\u201340 seconds to scan at cold start, while Microsoft IDEs and various other editors had negligible scan times in comparison (all under 1 second).<\/li>\n<li><strong>CLI-based tools<\/strong> (the command-line agents) took under ~2 seconds to scan, likely because they\u2019re small, simple binaries with few DLLs.<\/li>\n<\/ul>\n<h2>Collaboration with Microsoft and our solution<\/h2>\n<p>Even though we had built a tool to measure Microsoft Defender\u2019s impact, we still failed to fully understand Defender\u2019s scanning principles. We also consulted <a href=\"https:\/\/learn.microsoft.com\/defender-endpoint\/microsoft-defender-antivirus-windows\" target=\"_blank\" rel=\"noopener\">their documentation<\/a> to no avail. So we reached out to our colleagues at Microsoft directly!<\/p>\n<p>They helped us understand the parameters which cause Microsoft Defender to perform more work. A core principle was that files in write-protected folders would be optimized for scanning.<\/p>\n<p>At this point, we reviewed all the ways we install and start our tools to find a way to reduce the scanning times. One observation was that JetBrains Rider is subject to even more intensive scanning than IntelliJ IDEA and ReSharper combined. The reason for this was also not clear to us, so we asked the Microsoft team for help again. They were able to make optimizations on their end for this specific case and adjustments to Defender released in version 1.449.454.0. Now ReSharper OOP and JetBrains Rider get the scanning performance boost when installed into a write-protected directory:<\/p>\n<figure><\/figure>\n<p>JetBrains Toolbox installs software in the %LOCALAPPDATA%\\Programs directory. Since this directory does not require elevation for writing, Toolbox can update the software seamlessly, but as you can see in the chart above, it does not receive the write-protected performance boost.&nbsp;<\/p>\n<p><a href=\"https:\/\/blog.jetbrains.com\/dotnet\/2022\/12\/01\/improved-startup-performance-in-rider-2022-3\/\">As we\u2019ve reported previously<\/a>, Rider itself excludes some directories from Microsoft Defender during the installation process (<a href=\"https:\/\/rider-support.jetbrains.com\/hc\/en-us\/articles\/360006365380-How-Antivirus-Software-Affects-Rider-s-Performance-on-Windows\" target=\"_blank\" rel=\"noopener\">more about this here<\/a>). It uses the <a href=\"https:\/\/learn.microsoft.com\/en-us\/powershell\/module\/defender\/add-mppreference?view=windowsserver2025-ps\" target=\"_blank\" rel=\"noopener\">Add-MpPreference<\/a> PowerShell cmdlet to help you automatically configure a <a href=\"https:\/\/support.microsoft.com\/en-us\/windows\/security\/threat-malware-protection\/virus-and-threat-protection-in-the-windows-security-app#exclusions\" target=\"_blank\" rel=\"noopener\">Microsoft Defender exclusion<\/a>. We\u2019re still evaluating the best way to support the <a href=\"https:\/\/www.jetbrains.com\/toolbox-app\/\" target=\"_blank\" rel=\"noopener\">JetBrains Toolbox<\/a> installation of Rider and Microsoft Defender exclusions. You can follow our progress in our <a href=\"https:\/\/youtrack.jetbrains.com\/issue\/TBX-2851\" target=\"_blank\" rel=\"noopener\">TBX-2851 issue<\/a>.<\/p>\n<p>Note: The ability to add exclusions locally can be disabled\/blocked by administrators in managed environments.&nbsp;<\/p>\n<h2>Measuring for your own tool<\/h2>\n<p>If you\u2019re experiencing the slow startup of your own tool, it definitely makes sense to analyze whether Microsoft Defender is affecting it. To help with your investigation, we\u2019re releasing the tool we built for our own \u2013 the small and easy-to-use Defender Performance Tool. The source code and release builds are on <a href=\"https:\/\/github.com\/JetBrains\/defender_performance_tool\" target=\"_blank\" rel=\"noopener\">GitHub<\/a>.<\/p>\n<div>\n<figure><figcaption><em>Defender Performance Tool screenshot<\/em><\/figcaption><\/figure>\n<\/div>\n<p>A few things you can do with it:<\/p>\n<ul>\n<li>Watch your application\u2019s scan activity in real time as it starts, loads plugins, or compiles something.<\/li>\n<li>Open snapshots recorded offline with <a href=\"https:\/\/learn.microsoft.com\/en-us\/powershell\/module\/defenderperformance\/new-mpperformancerecording\" target=\"_blank\" rel=\"noopener\">New-MpPerformanceRecording<\/a>, so you can investigate traces from another machine (for example, one collected by a customer).<\/li>\n<li>Export a CSV file when multiple snapshots are loaded, for further analysis.<\/li>\n<\/ul>\n<p>We hope that helps you with similar investigations. Let us know of any interesting findings!<\/p>\n<h2>Conclusion<\/h2>\n<p>As you can see, Microsoft Defender can have a large impact on tooling performance. We learned a lot working with Microsoft in this area, and we hope our findings help developers and vendors understand how best to maintain the security of their Windows systems by observing and tuning Microsoft Defender\u2019s behavior.<\/p>\n<p>Summary of best practices for working with Microsoft Defender:<\/p>\n<ul>\n<li>Keep your Microsoft Defender definitions up-to-date.<\/li>\n<li>Use the Microsoft <a href=\"https:\/\/learn.microsoft.com\/defender-endpoint\/tune-performance-defender-antivirus\" target=\"_blank\" rel=\"noopener\">PowerShell module for Defender-related performance investigations<\/a>.<\/li>\n<li>Try our new tool to help analyze Microsoft Defender logs, available on <a href=\"https:\/\/github.com\/ulex\/windows_defender_performance_tool\" target=\"_blank\" rel=\"noopener\">GitHub<\/a>.<\/li>\n<li>Optimize Microsoft Defender scanning by installing software to write-protected directories.<\/li>\n<li>Use the <a href=\"https:\/\/learn.microsoft.com\/en-us\/powershell\/module\/defender\/add-mppreference?view=windowsserver2025-ps\" target=\"_blank\" rel=\"noopener\">Add-MpPreference<\/a> PowerShell cmdlet to help you automatically configure a <a href=\"https:\/\/support.microsoft.com\/en-us\/windows\/security\/threat-malware-protection\/virus-and-threat-protection-in-the-windows-security-app#exclusions\" target=\"_blank\" rel=\"noopener\">Microsoft Defender exclusion<\/a>, if required.<\/li>\n<li>Set up a <a href=\"https:\/\/learn.microsoft.com\/windows\/dev-drive\/\" target=\"_blank\" rel=\"noopener\">DevDrive<\/a> on your Windows machine for storing your repositories and package caches.<\/li>\n<\/ul>\n<p>Hopefully, you\u2019ve noticed these improvements to ReSharper and Rider in your workflow too! <a href=\"https:\/\/www.jetbrains.com\/resharper\/\" data-type=\"link\" data-id=\"https:\/\/www.jetbrains.com\/resharper\/\" target=\"_blank\" rel=\"noopener\">ReSharper 2026.2.1<\/a> now ships with OOP enabled by default. Try it out today!<\/p>\n<\/p><\/div>\n<p> <a href=\"#\"><\/a> <\/section>\n<div>\n<p><h2>Discover more<\/h2>\n<\/p><\/div>\n<\/p><\/div>\n<\/div>\n<\/div>\n<\/div>\n<p>Fuente: <a href=\"https:\/\/blog.jetbrains.com\/dotnet\/2026\/09\/09\/why-rider-and-resharper-were-slow-to-start-and-how-microsoft-helped-fix-the-problem\/\">Art\u00edculo original<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>.NET Tools ReSharper Platform Rider When we launched ReSharper\u2019s out-of-process (OOP) architecture, users reported slower startup times for IDEs using ReSharper on Windows. After profiling, the cause surprised us: Microsoft Defender was scanning our process for longer than we expected. This post is about what we found, what we learned working with Microsoft, and a [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":5086,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"webixso_pending_account_ids":""},"categories":[46],"tags":[],"class_list":["post-5087","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-jetbrain"],"jetpack_publicize_connections":[],"_links":{"self":[{"href":"https:\/\/tucumandevelopers.com\/index.php\/wp-json\/wp\/v2\/posts\/5087","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tucumandevelopers.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tucumandevelopers.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tucumandevelopers.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tucumandevelopers.com\/index.php\/wp-json\/wp\/v2\/comments?post=5087"}],"version-history":[{"count":0,"href":"https:\/\/tucumandevelopers.com\/index.php\/wp-json\/wp\/v2\/posts\/5087\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/tucumandevelopers.com\/index.php\/wp-json\/wp\/v2\/media\/5086"}],"wp:attachment":[{"href":"https:\/\/tucumandevelopers.com\/index.php\/wp-json\/wp\/v2\/media?parent=5087"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tucumandevelopers.com\/index.php\/wp-json\/wp\/v2\/categories?post=5087"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tucumandevelopers.com\/index.php\/wp-json\/wp\/v2\/tags?post=5087"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}