-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Expose metadata to mark analyzers for concurrent execution #6737
Comments
Possible design approaches:
|
This is a big deal for performance in large projects. 👍 I anticipate a majority of analyzers either supporting this from the start or only requiring minor updates to work with it. |
Design team decided on approach 3. |
…ts actions. By default, analyzer driver never makes concurrent callbacks into a single analyzer instance. This change adds a new public API 'AnalysisContext.RegisterConcurrentExecution' to enable thread-safe analyzers to receive concurrent callbacks, which should theoretically improve performance of such analyzers for concurrent builds. Fixes dotnet#6737
The VS 2015 Update 2 announcement references this issue as "enabling Analyzer writers to mark their analyzers for concurrent execution". But it took me some digging to discover that the new API is not The Update 2 announcement also mentions "providing control over whether analyzers run in generated code". For lack of a better place to put it, here's an example of doing that: |
[NOTE: Split from https://github.com//issues/1565, which now only tracks enabling incremental analysis for 3rd party analyzers in IDE]
This issue tracks exposing metadata from analyzers to mark them as thread-safe, such that analyzer driver will be free to make concurrent action callbacks into the analyzer instance.
The text was updated successfully, but these errors were encountered: