Skip to content
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

maven plugin - Reduce amount of created jandex indexes. #957

Merged
merged 1 commit into from
Nov 8, 2021

Conversation

Postremus
Copy link
Contributor

This introduces a blacklist of artifacts, for which no jandex index is ever created, since they won't have impact on the generated scheme.
Also, cache the indexes that are created using their gavct as key.

I tested this with a project with 2 modules, each module having 4 executions of the maven-plugin.
sroa-scanpackages.zip
I ran mvn clean compile 3 times, taking the average reported by mvn as total time.

2.1.15: 19.067s
only blacklist: 7.003s
only cache: 5.471s
blacklist and cache: 4.447s

closes #954

Comment on lines 46 to 70
ignoredArtifacts.add("org.graalvm.sdk:graal-sdk");
ignoredArtifacts.add("org.yaml:snakeyaml");
ignoredArtifacts.add("org.wildfly.common:wildfly-common");
ignoredArtifacts.add("com.fasterxml.jackson.core:jackson-core");
ignoredArtifacts.add("com.fasterxml.jackson.core:jackson-databind");
ignoredArtifacts.add("io.quarkus:quarkus-vertx-http");
ignoredArtifacts.add("io.smallrye:smallrye-open-api-core");
ignoredArtifacts.add("io.smallrye.reactive:smallrye-mutiny-vertx-core");
ignoredArtifacts.add("commons-io:commons-io");
ignoredArtifacts.add("io.smallrye.reactive:mutiny");
ignoredArtifacts.add("org.jboss.narayana.jta:narayana-jta");
ignoredArtifacts.add("org.glassfish.jaxb:jaxb-runtime");
ignoredArtifacts.add("com.github.ben-manes.caffeine:caffeine");
ignoredArtifacts.add("org.hibernate.validator:hibernate-validator");
ignoredArtifacts.add("io.smallrye.config:smallrye-config-core");
ignoredArtifacts.add("com.thoughtworks.xstream:xstream");
ignoredArtifacts.add("com.github.javaparser:javaparser-core");
ignoredArtifacts.add("org.jboss:jandex");

ignoredArtifacts.add("antlr");
ignoredArtifacts.add("io.netty");
ignoredArtifacts.add("org.drools");
ignoredArtifacts.add("net.bytebuddy");
ignoredArtifacts.add("io.vertx");
ignoredArtifacts.add("org.hibernate");
ignoredArtifacts.add("org.kie");
ignoredArtifacts.add("org.postgresql");
ignoredArtifacts.add("org.apache.httpcomponents");
Copy link
Contributor Author

@Postremus Postremus Nov 7, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not quit sure about having to maintain a list of blacklisted artifacts.
It does reduces the total time by about 1s though, which makes this justifiable (imo). The effect scales, if the project has more modules, and/or more dependencies.

WDYT?

@Postremus Postremus force-pushed the #954-backlist-and-cache branch 3 times, most recently from baf9bf2 to 043a09d Compare November 7, 2021 20:56
@phillip-kruger
Copy link
Member

Hi @Postremus - Thanks for this. Please resolve confict

This introduces a blacklist of artifacts, for which no jandex index is ever created, since they won't have impact on the generated scheme.
Also, cache the indexes that are created using their gavct
@Postremus
Copy link
Contributor Author

@phillip-kruger done

Copy link
Member

@phillip-kruger phillip-kruger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks !

@phillip-kruger phillip-kruger added this to the 2.1.16 milestone Nov 8, 2021
@phillip-kruger phillip-kruger merged commit f04850d into smallrye:main Nov 8, 2021
@Postremus Postremus deleted the #954-backlist-and-cache branch November 8, 2021 18:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

maven-plugin reuse CompositeIndex for multiple schemas
2 participants