Add information about Windows Defender's impact on analysis performance and Dev Drives #6125
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
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.
.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)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.
The text was updated successfully, but these errors were encountered: