diff options
author | Daniel Stenberg <daniel@haxx.se> | 2023-03-26 17:43:28 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2023-03-26 17:43:28 +0200 |
commit | 843b3baa3e3cb2280064626a530bb9e3e2ccbb9b (patch) | |
tree | e6e8eb6226f634d0c5d1c7f7d376a9dfdba426f8 /lib/urldata.h | |
parent | 9d107b6954d5690731f86702105d2e29421f7226 (diff) | |
download | curl-843b3baa3e3cb2280064626a530bb9e3e2ccbb9b.tar.gz |
multi: remove PENDING + MSGSENT handles from the main linked list
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
Diffstat (limited to 'lib/urldata.h')
-rw-r--r-- | lib/urldata.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/urldata.h b/lib/urldata.h index 86b3da718..1fc9d91ff 100644 --- a/lib/urldata.h +++ b/lib/urldata.h @@ -1903,7 +1903,8 @@ struct Curl_easy { struct Curl_easy *prev; struct connectdata *conn; - struct Curl_llist_element connect_queue; + struct Curl_llist_element connect_queue; /* for the pending and msgsent + lists */ struct Curl_llist_element conn_queue; /* list per connectdata */ CURLMstate mstate; /* the handle's state */ |