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

When reading cookies from a file, only run remove_expired once #2441

wants to merge 3 commits into from


Copy link

@clbr clbr commented Mar 30, 2018

Combined with #2440, this drops the cookie load time for 8k cookies from 178ms to 15ms. All tests pass.

Copy link

bagder commented Mar 30, 2018

Thanks, this looks like a great improvement. Try make checksrc to see the issues the CI reports:

./setopt.c:784:86: warning: Longer than 79 columns (LONGLINE)
           Curl_cookie_add(data, data->cookies, TRUE, FALSE, argptr + 11, NULL, NULL);
./setopt.c:788:82: warning: Longer than 79 columns (LONGLINE)
           Curl_cookie_add(data, data->cookies, FALSE, FALSE, argptr, NULL, NULL);

lib/cookie.c Outdated
@@ -819,7 +820,7 @@ Curl_cookie_add(struct Curl_easy *data,
the same domain and path as this */

/* at first, remove expired cookies */
if(!noexpire) remove_expired(c);
Copy link

Choose a reason for hiding this comment

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

Nit: we put the conditional block on a new line below the if() line, never on the same!

Copy link

bagder commented Apr 2, 2018


@bagder bagder closed this in 4073cd8 Apr 2, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Jul 1, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet

Successfully merging this pull request may close these issues.

None yet

2 participants