Skip to content

Conversation

@bagder
Copy link
Member

@bagder bagder commented Mar 20, 2023

As they are not driving transfers or any socket activity, the main loop does not need to iterate over these handles. A performance improvement.

They are instead only held in their own separate lists.

'data->multi' is kept a pointer to the multi handle as long as the easy handle is actually part of it even when the handle is moved to the pending/msgsent lists. ->multi gets cleared by curl_multi_cleanup() which "orphans" all previously attached easy handles.

This is take 2. The first version was reverted for the 8.0.1 release.

Assisted-by: Stefan Eissing

@bagder bagder force-pushed the bagder/unlink-done-nodes branch from d6bcf2b to 625cd58 Compare March 22, 2023 13:05
@bagder bagder force-pushed the bagder/unlink-done-nodes branch from 625cd58 to dc609d3 Compare March 23, 2023 22:37
As they are not driving transfers or any socket activity, the main loop
does not need to iterate over these handles. A performance improvement.

They are instead only held in their own separate lists.

'data->multi' is kept a pointer to the multi handle as long as the easy
handle is actually part of it even when the handle is moved to the
pending/msgsent lists. It needs to know which multi handle it belongs
to, if for example curl_easy_cleanup() is called before the handle is
removed from the multi handle.

Alll 'data->multi' pointers of handles still part of the multi handle
gets cleared by curl_multi_cleanup() which "orphans" all previously
attached easy handles.

This is take 2. The first version was reverted for the 8.0.1 release.

Assisted-by: Stefan Eissing
Closes #10801
@bagder bagder force-pushed the bagder/unlink-done-nodes branch from dc609d3 to 39ee6a2 Compare March 24, 2023 10:59
@bagder bagder closed this in 843b3ba Mar 26, 2023
@bagder bagder deleted the bagder/unlink-done-nodes branch March 26, 2023 15:44
@jeroen
Copy link
Contributor

jeroen commented Jun 16, 2023

I think a side effect of this is that curl_multi_fdset() no longer shows these connections, see jeroen/curl#299

bch pushed a commit to bch/curl that referenced this pull request Jul 19, 2023
As they are not driving transfers or any socket activity, the main loop
does not need to iterate over these handles. A performance improvement.

They are instead only held in their own separate lists.

'data->multi' is kept a pointer to the multi handle as long as the easy
handle is actually part of it even when the handle is moved to the
pending/msgsent lists. It needs to know which multi handle it belongs
to, if for example curl_easy_cleanup() is called before the handle is
removed from the multi handle.

Alll 'data->multi' pointers of handles still part of the multi handle
gets cleared by curl_multi_cleanup() which "orphans" all previously
attached easy handles.

This is take 2. The first version was reverted for the 8.0.1 release.

Assisted-by: Stefan Eissing
Closes curl#10801
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants