Skip to content

Commit 064c3ea

Browse files
facchinmcmaglie
authored andcommitted
parallelize additional jsons download
1 parent e76c7cd commit 064c3ea

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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)