Skip to content

Commit 45d6ac8

Browse files
committed
parallelize additional jsons download
1 parent 2b6a341 commit 45d6ac8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: arduino-core/src/cc/arduino/contributions/packages/ContributionInstaller.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -292,13 +292,13 @@ public synchronized List<String> updateIndex(ProgressListener progressListener)
292292
packageIndexURLs.addAll(Arrays.asList(additionalURLs.split(",")));
293293
}
294294

295-
for (String packageIndexURL : packageIndexURLs) {
295+
packageIndexURLs.parallelStream().forEach(packageIndexURL -> {
296296
try {
297297
downloadIndexAndSignature(progress, downloadedPackageIndexFilesAccumulator, packageIndexURL, progressListener);
298298
} catch (Exception e) {
299299
System.err.println(e.getMessage());
300300
}
301-
}
301+
});
302302

303303
progress.stepDone();
304304

0 commit comments

Comments
 (0)