dart-lang / sdk

The Dart SDK, including the VM, JS and Wasm compilers, analysis, core libraries, and more.
https://dart.dev
BSD 3-Clause "New" or "Revised" License
10.27k stars 1.58k forks source link

[CP] [analyzer] Limit the number of plugins-per-context to one #51272

Closed srawlins closed 1 year ago

srawlins commented 1 year ago

Commit(s) to merge

0ab9f97 and 5fe2f3b

Target

stable

Prepared changelist for beta/stable

https://dart-review.googlesource.com/c/sdk/+/281300

Issue Description

Some users complain on social media that the Dart Analysis Server is slow and consumes a lot of memory. One theory is that these users may be using multiple analyzer plugins and are unaware that they are, or unaware that these multiple analyzer plugins are the culprit. To mitigate this issue, we are limiting the number of analyzer plugins per analysis context to 1.

What is the fix

The fix is to limit the number of analyzer plugins per analysis context to 1.

Why cherry-pick

It may be a pressing issue that some users have a poor editing experience due to multiple plugins being run simultaneously. We'd like to fix this before Dart 3.

Risk

medium

Issue link(s)

50981

Extra Info

I write 'medium' risk, without really knowing what 'low', 'medium', or 'high' mean, for a few reasons:

Replaces https://github.com/dart-lang/sdk/issues/51062, which was a cherry-pick for beta.

itsjustkevin commented 1 year ago

Cherry-pick was approved for the beta branch in https://github.com/dart-lang/sdk/issues/51272. Marking this as approved due to approvals from the previous issue.

FYI: @whesse @devoncarew @athomas

srawlins commented 1 year ago

Let me know if there's anything I should do here, or if I should close this.

srawlins commented 1 year ago

This was merged. I think this can be closed.