Navigation Menu

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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parallel downloading #49

Merged
merged 1 commit into from Jul 25, 2019
Merged

Parallel downloading #49

merged 1 commit into from Jul 25, 2019

Conversation

jetersen
Copy link
Member

@jetersen jetersen commented Jul 25, 2019

Hopefully, this should speed up downloads 馃槄

time diff I did on our plugins.txt:
.jar after:

real    2m 55.19s
user    0m 10.79s
sys     0m 3.04s

.jar before:

real    8m 1.32s
user    0m 15.58s
sys     0m 5.06s

.sh:

real    0m 48.37s
user    0m 7.77s
sys     0m 4.02s

@@ -194,13 +194,13 @@ public void outputFailedPlugins() {
* @param plugins list of plugins to download
*/
public void downloadPlugins(List<Plugin> plugins) {
for (Plugin plugin : plugins) {
plugins.parallelStream().forEach(plugin -> {
Copy link
Member

Choose a reason for hiding this comment

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

can you run it on your setup and see if it helps 馃槃

Copy link
Member Author

@jetersen jetersen Jul 25, 2019

Choose a reason for hiding this comment

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

That was the plan! I am just abusing Jenkins CI to get the jar 馃槄

Copy link
Member Author

@jetersen jetersen Jul 25, 2019

Choose a reason for hiding this comment

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

Holy crap 馃檶

real    1m 6.93s
user    0m 8.98s
sys     0m 1.86s

I think we can optimize it even more if we play with custom thread pool and just doing it on all available cores (+hyper threading)

Copy link
Member Author

Choose a reason for hiding this comment

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

but reading up on optimizing I would say NOPE 馃槄

@timja timja requested a review from stopalopa July 25, 2019 13:09
@jetersen
Copy link
Member Author

Okay after fixing #50 the full download takes

real    2m 55.19s
user    0m 10.79s
sys     0m 3.04s

Still a huge improvement but I think we can do better!

@jetersen
Copy link
Member Author

I'd say let's merge this at least and then we can worry about improving the download even more!

@timja timja added the enhancement New feature or request label Jul 25, 2019
@timja timja merged commit 4516c7e into jenkinsci:master Jul 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants