Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add information about Windows Defender's impact on analysis performance and Dev Drives #6125

Open
1 task
DanTup opened this issue Oct 3, 2024 · 0 comments
Open
1 task
Labels
co.request Community ask for documentation devos.Windows Relates to developing apps on the Windows platform from.user Issue raised by user p3-low Valid but not urgent concern. Resolve when possible. Encourage upvote to surface. t.cli-tools Relates to the dart command line tools t.diagnostics Relates to diagnostics, analysis, or linting of code

Comments

@DanTup
Copy link
Contributor

DanTup commented Oct 3, 2024

What information needs to be added?

(Related issue: dart-lang/sdk#56755)

Windows Defender can significantly slow down the first analysis of a project after a reboot because it blocks reads from disk while it scans the contents. The analysis server may read a few thousand files from %LOCALAPPDATA%\.dartServer\.analysis-driver as it performs initial analysis and in my testing this can take 30-40 seconds when without Defender it would take only around 3 seconds.

It would be useful to have a central page on the Dart website that details this, as somewhere to point people that are reporting performance issues to see if it's this known issue or something different.

  • Excluding the .dartServer and PubCache folders from Defender may result in a significant improvement in first analysis time (though excluding anything from Defender obviously is a performance vs security trade-off)
  • Using a Windows Dev Drive can also improve the performance with less of a security trade-off because a Dev Drive allows Defender to scan asynchronously (instead of blocking the file read while it scans) instead of skipping it entirely. However, you'd need to move the PubCache (PUB_CACHE) and .dartServer (ANALYZER_STATE_LOCATION_OVERRIDE) folders to it specifically.

I don't know if either of these should be recommended, but it may be useful to at least document them for users to decide.

Where should this new content appear?

I'm not sure where it's best to put this (which is why I'm filing this instead starting a PR), but probably in the https://dart.dev/tools section somewhere?

It would probably make sense to also link to it from the setup pages both here and on the Flutter website.

I would like to fix this problem.

  • I will try and fix this problem on dart.dev.
@DanTup DanTup added co.request Community ask for documentation from.user Issue raised by user labels Oct 3, 2024
@parlough parlough added p3-low Valid but not urgent concern. Resolve when possible. Encourage upvote to surface. t.cli-tools Relates to the dart command line tools t.diagnostics Relates to diagnostics, analysis, or linting of code devos.Windows Relates to developing apps on the Windows platform labels Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
co.request Community ask for documentation devos.Windows Relates to developing apps on the Windows platform from.user Issue raised by user p3-low Valid but not urgent concern. Resolve when possible. Encourage upvote to surface. t.cli-tools Relates to the dart command line tools t.diagnostics Relates to diagnostics, analysis, or linting of code
Projects
None yet
Development

No branches or pull requests

2 participants