[release/8.0-preview7] Filter list of candidate invocations for parsing in binding generator #89266
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.
Backport of #89226 to release/8.0-preview7
/cc @layomia
Customer Impact
Improves IDE perf when the generator is used. Average time spent in the generator goes from ~2s to ~145ms, using the Roslyn repo as a test. Details in #89226 / https://gist.github.com/layomia/8f51ac107f76853f4f37a6a7c596f67e.
Testing
Existing tests still pass. Manual testing with tracing demonstrates significant performance improvement.
Risk
Invocation processing logic is the same, just filtering based on the names of the input method calls, and avoiding expensive checks (i.e skipping from the list) when there's no match. There might method name aliasing which could cause dropping some calls, but it's probably fair to expect an exact match e.g.
.Bind
,.Configure
, etc. It would be good to get any feedback/issues filed here.