-
Notifications
You must be signed in to change notification settings - Fork 747
Add analyzer performance page #7020
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
Merged
Merged
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 fd42f81
Update src/content/tools/analyzer-performance.md
conooi 2e22017
Update src/content/tools/analyzer-performance.md
conooi a39abb0
Update src/content/tools/analyzer-performance.md
conooi 22b105a
Update src/content/tools/analyzer-performance.md
conooi f6aa4db
Fix links for semantic breaks
conooi 929c709
Update src/data/sidenav/default.yml
conooi b885f12
Update src/content/tools/analyzer-performance.md
conooi 3eab443
Update src/content/tools/analyzer-performance.md
conooi befbe72
Update src/content/tools/analyzer-performance.md
conooi 72313b9
Update src/content/tools/analyzer-performance.md
conooi 8f13c3f
Update src/content/tools/analyzer-performance.md
conooi dc3bc37
Update src/content/tools/analyzer-performance.md
conooi b58a55b
Update src/content/tools/analyzer-performance.md
conooi 57cbd20
Update src/content/tools/analyzer-performance.md
conooi d727670
Update src/content/tools/analyzer-performance.md
conooi 0c4cb3b
Update src/content/tools/analyzer-performance.md
conooi 417df94
Update src/content/tools/analyzer-performance.md
conooi 808d8e7
Update src/content/tools/analyzer-performance.md
conooi b99d86b
Update src/content/tools/analyzer-performance.md
conooi 21353c1
Add crosslink on analysis page
conooi 6c26b36
Fix procedure formatting
conooi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | ||
|
|
||
| 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 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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!