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

Closed
wants to merge 3 commits into
base: master
from

Conversation

Projects
None yet
2 participants
@clbr
Contributor

clbr commented Mar 30, 2018

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

@bagder

This comment has been minimized.

Member

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);
@@ -819,7 +820,7 @@ Curl_cookie_add(struct Curl_easy *data,
the same domain and path as this */
/* at first, remove expired cookies */
remove_expired(c);
if(!noexpire) remove_expired(c);

This comment has been minimized.

@bagder

bagder Mar 31, 2018

Member

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

@bagder

This comment has been minimized.

Member

bagder commented Apr 2, 2018

Thanks!

@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.