-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Use RevApi Code Extensions for Better Performance #33130
Use RevApi Code Extensions for Better Performance #33130
Conversation
API change check API changes are not detected in this pull request. |
/check-enforcer evaluate |
@@ -51,7 +51,7 @@ public TransformationResult tryTransform(@Nullable E oldElement, @Nullable E new | |||
return TransformationResult.keep(); | |||
} | |||
|
|||
if (!CORE_ARCHIVE.matcher(newArchive).matches()) { | |||
if (!newArchive.startsWith("com.azure:azure-core:")) { |
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.
nit: should strings like this be const values defined elsewhere.
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.
Since they're only used in one location they don't explicitly need to be as the compiler will change them to constants in the class file.
/azp run java - resourcemanager |
/azp run java - spring |
Azure Pipelines successfully started running 1 pipeline(s). |
1 similar comment
Azure Pipelines successfully started running 1 pipeline(s). |
Description
At this time, we have a centralized RevApi configuration for all SDKs and due to having a single configuration it has a very large set of filters and transforms. Each filter and transform adds a non-trivial amount of overhead when running RevApi analysis as these configurations are turned into code filters and transform, from my understanding, on a one-to-one bases of configuration entry to operation performed in a list, meaning that with each run time for RevApi linting effectively grows linearly.
This PR changes portions of our RevApi configuration to begin using RevApi extension code where many filters and transforms are compacted into a single operation. The first change is using a single custom
TreeFilterProvider
to handle filtering out APIs from RevApi analysis. The change not only removes many filters that would have been created before it uses non-allocatingString
comparisons instead of regexes, greatly reducing CPU usage and memory allocations.Reduces a RevApi only validation run in
code-quality-reports
from roughly 90-105 minutes to 30-35 minutes. Reduces Analyze stage of Spring pipelines from about 30 minutes to 15 minutes and Resource Manager pipelines from about 50 minutes to 25 minutes.All SDK Contribution checklist:
General Guidelines and Best Practices
Testing Guidelines