Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
38f52f7
Add analyzer performance page
conooi Nov 14, 2025
fd42f81
Update src/content/tools/analyzer-performance.md
conooi Nov 14, 2025
2e22017
Update src/content/tools/analyzer-performance.md
conooi Nov 14, 2025
a39abb0
Update src/content/tools/analyzer-performance.md
conooi Nov 14, 2025
22b105a
Update src/content/tools/analyzer-performance.md
conooi Nov 14, 2025
f6aa4db
Fix links for semantic breaks
conooi Nov 14, 2025
929c709
Update src/data/sidenav/default.yml
conooi Nov 17, 2025
b885f12
Update src/content/tools/analyzer-performance.md
conooi Nov 17, 2025
3eab443
Update src/content/tools/analyzer-performance.md
conooi Nov 17, 2025
befbe72
Update src/content/tools/analyzer-performance.md
conooi Nov 17, 2025
72313b9
Update src/content/tools/analyzer-performance.md
conooi Nov 17, 2025
8f13c3f
Update src/content/tools/analyzer-performance.md
conooi Nov 17, 2025
dc3bc37
Update src/content/tools/analyzer-performance.md
conooi Nov 17, 2025
b58a55b
Update src/content/tools/analyzer-performance.md
conooi Nov 17, 2025
57cbd20
Update src/content/tools/analyzer-performance.md
conooi Nov 17, 2025
d727670
Update src/content/tools/analyzer-performance.md
conooi Nov 17, 2025
0c4cb3b
Update src/content/tools/analyzer-performance.md
conooi Nov 17, 2025
417df94
Update src/content/tools/analyzer-performance.md
conooi Nov 17, 2025
808d8e7
Update src/content/tools/analyzer-performance.md
conooi Nov 17, 2025
b99d86b
Update src/content/tools/analyzer-performance.md
conooi Nov 17, 2025
21353c1
Add crosslink on analysis page
conooi Nov 17, 2025
6c26b36
Fix procedure formatting
conooi Nov 19, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion site/lib/src/style_hash.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
// dart format off

/// The generated hash of the `main.css` file.
const generatedStylesHash = 'yDmRCh8GrQiX';
const generatedStylesHash = 'X6ZbnMpWSdwu';
2 changes: 2 additions & 0 deletions src/content/tools/analysis.md
Original file line number Diff line number Diff line change
Expand Up @@ -657,6 +657,7 @@ Use the following resources to learn more about static analysis in Dart:
* [Dart's type system][type-system]
* [Dart linter rules][linter rules]
* [analyzer package]({{site.pub-pkg}}/analyzer)
* [Troubleshoot analyzer performance][]

[invalid_null_aware_operator]: /tools/diagnostic-messages#invalid_null_aware_operator
[analyzer diagnostics]: /tools/diagnostic-messages
Expand All @@ -671,3 +672,4 @@ Use the following resources to learn more about static analysis in Dart:
[Effective Dart]: /effective-dart
[`dart format`]: /tools/dart-format
[Configuring formatter page width]: /tools/dart-format#configuring-formatter-page-width
[Troubleshoot analyzer performance]: /tools/analyzer-performance
112 changes: 112 additions & 0 deletions src/content/tools/analyzer-performance.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
---
title: Troubleshoot analyzer performance
description: >-
Learn how to diagnose and resolve common
Dart analysis server performance issues.
---

This guide helps you diagnose and resolve common Dart analysis server
performance issues in your Dart or Flutter IDE.

## Known performance issues

Several common issues significantly hurt the performance of
the Dart analysis server (the analyzer).
Check the following issues to see if they might be impacting
your development environment.

### Security software on Windows

On Windows systems, if Windows Defender (or other real-time security software)
is enabled, it can slow down the file read times enough
to impact analyzer performance. The analyzer frequently reads files,
and constant scanning can introduce latency. To mitigate this,
you can set up exclusions for the directories the analyzer reads from.

:::warning
Excluding directories from security scans might diminish the
protection that your antivirus software provides.
Proceed with caution.
:::

If you choose to set up exclusions, include the following directories:

* The analysis server's cache directory: `%LOCALAPPDATA%\.dartServer`
* The directory for packages downloaded by pub: `%LOCALAPPDATA%\Pub\Cache`
* Any other directories containing code for your applications.

For another way to improve file I/O performance,
consider setting up a [dev drive][].

### Symbolic links

If your package directory contains symbolic links that point
to a location inside the same directory, or to a parent directory,
you might experience performance problems with Dart tooling (like the analyzer).

**Status:** The Dart team is actively working on a fix for this issue.

**Workaround:** There are no known workarounds at this time.

## Report unknown issues

If the known issues don't seem to apply to your situation,
please open an issue in the [Dart SDK issue tracker][].
The more information you provide,
the faster the team can diagnose and fix the problem.

### Include reproduction steps

In your issue, please provide detailed steps to
reproduce the behavior you're observing.

1. If you're working on an open-source project, include instructions
for downloading the code.
2. If you can't share your code, create a small, self-contained reproduction case.
3. If you can't provide either, please state that in the issue.

### Provide performance data
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's follow the Google Developer Style guide for procedures: https://developers.google.com/style/procedures

If you have any questions, ping me!


If the issue is related to performance, providing performance data
can be very helpful. You can collect this data using the
analysis server's diagnostic pages:

1. **Open the Analyzer Diagnostics page:**
* **If you are using VS Code:**
1. Click **View > Command Palette**.
2. Type `Dart: Open Analyzer Diagnostics` and select it.
* **If you are using IntelliJ / Android Studio:**
1. Open the **Dart Analysis** tool window.
2. Click the settings icon, and then select **View analyzer diagnostics**.
2. **Collect the report:**
1. In the browser page that opens, click **Collect Report** in the top banner.
2. Perform the actions that trigger the slow behavior.
3. Click the **Download report** link.
3. **Attach the report to your issue.**

:::note
While the report shouldn't contain
personal or proprietary information,
review it before submitting it.
:::

### Capture instrumentation logs

In some cases, instrumentation logs can provide additional
details for diagnosing issues.

To capture these logs:

* **VS Code:** Follow the instructions for
[capturing analyzer instrumentation logs][].
* **IntelliJ / Android Studio:** Follow the
[analyzer instrumentation instructions][].

Before attaching logs to a GitHub issue, review them carefully
to ensure they do not contain any personal, sensitive, or proprietary
information.

[dev drive]: https://learn.microsoft.com/windows/dev-drive/
[Dart SDK issue tracker]: https://github.com/dart-lang/sdk/issues
[capturing analyzer instrumentation logs]: https://dartcode.org/docs/logging/#analyzer-instrumentation
[analyzer instrumentation instructions]: https://github.com/dart-lang/sdk/blob/main/pkg/analysis_server/doc/tutorial/instrumentation.md#intellij-idea-and-android-studio
2 changes: 2 additions & 0 deletions src/data/sidenav/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,8 @@
permalink: /tools/jetbrains-plugin
- title: VS Code
permalink: /tools/vs-code
- title: Troubleshoot analyzer performance
permalink: /tools/analyzer-performance
- title: Dart DevTools
permalink: /tools/dart-devtools
- title: DartPad
Expand Down