smartics / smartics-jboss-modules-maven-plugin

Generates an archive of modules based on information in a POM to be copied to an JBoss 7 installation.
https://www.smartics.eu/confluence/display/SJBMMP/
Other
13 stars 10 forks source link

Performance of ApplyToDependencies merge operations degrade as the number of module resources increases #16

Closed jamesnetherton closed 9 years ago

jamesnetherton commented 9 years ago

The performance of ApplyToDependencies merge operations degrades as the number of module resources increases.

At present we have this in ApplyToDependencies.java:

private final List<DependenciesDescriptor> descriptors;                

Since we're using a List, merge operations result in this list becoming exponentially larger over time (with many duplicate entries) which makes iterations over its contents very slow.

One way to avoid this would be to use a Set and ensure that DependenciesDescriptor.java has an appropriate equals & hashCode implementation to prevent duplicates being added.