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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

curl: add --parallel-immediate #4500

Closed
wants to merge 2 commits into from

Conversation

@bagder
Copy link
Member

bagder commented Oct 17, 2019

Starting with this change when doing parallel transfers, without this
option set, curl will prefer to create new transfers multiplexed on an
existing connection rather than creating a brand new one.

--parallel-connect can be set to tell curl to prefer to use new
connections rather than to wait and try to multiplex.

libcurl-wise, this means that curl will set CURLOPT_PIPEWAIT by default
on parallel transfers.

Fixes #4494
Suggested-by: Tom van der Woerdt

@jay

This comment has been minimized.

Copy link
Member

jay commented Oct 18, 2019

I'd call it something easier to understand for anyone reading a shell script like --parallel-nowait. But although that is technically accurate I find it kind of misleading because --IMHO-- strategically it's better to wait to multiplex than fan out, and I think by adding an option named nowait users are going to think, well, obviously I don't want to wait. Who wants to wait? I think the pipewait change was a good one and I'd skip this.

@bagder

This comment has been minimized.

Copy link
Member Author

bagder commented Oct 18, 2019

I'd call it something easier to understand for anyone reading a shell script

Yeah. Naming is hard. I'll think some more on this.

I think the pipewait change was a good one and I'd skip this.

I'm sorry, I don't understand this comment. This is the PR that introduces pipewait for the curl tool when doing parallel transfers...

@jay

This comment has been minimized.

Copy link
Member

jay commented Oct 19, 2019

I think the pipewait change was a good one and I'd skip this.

I'm sorry, I don't understand this comment. This is the PR that introduces pipewait for the curl tool when doing parallel transfers...

Oh I thought that already went in, I must have misread. I thought this: (void)curl_easy_setopt(per->curl, CURLOPT_PIPEWAIT, 1L);

On second thought I think an option to disable it could be useful for when there is prior knowledge of a server.

@bagder

This comment has been minimized.

Copy link
Member Author

bagder commented Oct 19, 2019

That's my thinking as well!

@bagder

This comment has been minimized.

Copy link
Member Author

bagder commented Nov 8, 2019

Alternative name suggestions for this option:

--parallel-preferred
--parallel-at-once
--parallel-directly

I think my personal preference is the last one here.

@jay

This comment has been minimized.

Copy link
Member

jay commented Nov 8, 2019

I don't like any of those but I still like --parallel-nowait, somewhat.

src/tool_help.c Outdated Show resolved Hide resolved
@bagder

This comment has been minimized.

Copy link
Member Author

bagder commented Nov 18, 2019

Out of the suggestions replied on the mailing list and as responses to my tweet, the only real contender that could work that I spotted is --parallel-immediate. I kind of like that.

@bagder bagder force-pushed the bagder/parallel-connect branch from d056dbb to 9df751b Nov 18, 2019
@bagder bagder changed the title curl: add --parallel-connect curl: add --parallel-immediate Nov 18, 2019
@bagder

This comment has been minimized.

Copy link
Member Author

bagder commented Nov 18, 2019

I think I'm done bike-shedding this now. It is a rather minor option anyway and few people will want to use it. I rebased and force-pushed, will work on merging this soon.

Starting with this change when doing parallel transfers, without this
option set, curl will prefer to create new transfers multiplexed on an
existing connection rather than creating a brand new one.

--parallel-immediate can be set to tell curl to prefer to use new
connections rather than to wait and try to multiplex.

libcurl-wise, this means that curl will set CURLOPT_PIPEWAIT by default
on parallel transfers.

Suggested-by: Tom van der Woerdt
@bagder bagder force-pushed the bagder/parallel-connect branch from 9df751b to c9baf5d Nov 19, 2019
@bagder bagder closed this in 215baa7 Nov 21, 2019
@bagder bagder deleted the bagder/parallel-connect branch Nov 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.