Skip to content

Commit

Permalink
Do not retain CqCatalog in a ThreadLocal to save ~80MB of Maven build…
Browse files Browse the repository at this point in the history
… heap
  • Loading branch information
ppalaga committed May 31, 2021
1 parent 80ef53c commit 9b88c75
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public void execute() throws MojoExecutionException, MojoFailureException {
final Map<String, Set<String>> schemesByKind = new LinkedHashMap<>();
CqCatalog.kinds().forEach(kind -> schemesByKind.put(kind.name(), new TreeSet<>()));

final CqCatalog catalog = CqCatalog.getThreadLocalCamelCatalog();
final CqCatalog catalog = new CqCatalog();
extensionDirectories.stream()
.map(File::toPath)
.forEach(extDir -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public void execute() throws MojoExecutionException, MojoFailureException {
return;
}

final CqCatalog catalog = CqCatalog.getThreadLocalCamelCatalog();
final CqCatalog catalog = new CqCatalog();

final Path multiModuleProjectDirectoryPath = multiModuleProjectDirectory.toPath();
final CamelQuarkusExtension ext = CamelQuarkusExtension.read(basePath.resolve("pom.xml"));
Expand Down

0 comments on commit 9b88c75

Please sign in to comment.