WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
109931
[Soup] Leverage new soup_cookie_jar_get_cookie_list() API
https://bugs.webkit.org/show_bug.cgi?id=109931
Summary
[Soup] Leverage new soup_cookie_jar_get_cookie_list() API
Chris Dumez
Reported
2013-02-15 05:49:38 PST
In several cases, the CookieJarSoup implementation retrieves / copies ALL the cookies using soup_cookie_jar_all_cookies() and then uses soup_cookie_applies_to_uri() to filter out cookies it is not interested in. This is inefficient. In libsoup 2.40, soup_cookie_jar_get_cookie_list(SoupCookieJar *jar, SoupURI *uri, gboolean for_http) was introduced to retrieve only the cookies that apply to a given URI. We should leverage this new API as it would be much more efficient. libsoup internally stores cookies in a hash table using the host name as key. Therefore, it can retrieve the cookies for a given hostname in O(1). It still iterates over the list of cookies and calls soup_cookie_applies_to_uri() to do further filtering. However, it will iterate over a lot less cookies and it will NOT copy cookies we are not interested in.
Attachments
Patch
(3.52 KB, patch)
2013-02-15 05:55 PST
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Chris Dumez
Comment 1
2013-02-15 05:55:58 PST
Created
attachment 188548
[details]
Patch
Kenneth Rohde Christiansen
Comment 2
2013-02-15 06:00:57 PST
Comment on
attachment 188548
[details]
Patch LGTM
Chris Dumez
Comment 3
2013-02-15 06:13:33 PST
Martin, kov, could one of you please take a quick look before we land?
WebKit Review Bot
Comment 4
2013-02-15 09:11:28 PST
Comment on
attachment 188548
[details]
Patch Clearing flags on attachment: 188548 Committed
r143009
: <
http://trac.webkit.org/changeset/143009
>
WebKit Review Bot
Comment 5
2013-02-15 09:11:32 PST
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug